diff --git a/modules/openapi-generator/src/main/resources/typescript/package.mustache b/modules/openapi-generator/src/main/resources/typescript/package.mustache index d42810ec010..f192d2ef72d 100644 --- a/modules/openapi-generator/src/main/resources/typescript/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/package.mustache @@ -15,8 +15,10 @@ ], "license": "Unlicense", "main": "./dist/index.js", + {{#supportTypeModule}} "type": "module", "module": "./dist/index.js", + {{/supportTypeModule}} "exports": { ".": { "import": "./dist/index.js", diff --git a/samples/client/others/typescript/builds/with-unique-items/package.json b/samples/client/others/typescript/builds/with-unique-items/package.json index fe1ae8328e7..acc457027c0 100644 --- a/samples/client/others/typescript/builds/with-unique-items/package.json +++ b/samples/client/others/typescript/builds/with-unique-items/package.json @@ -15,8 +15,6 @@ ], "license": "Unlicense", "main": "./dist/index.js", - "type": "module", - "module": "./dist/index.js", "exports": { ".": { "import": "./dist/index.js", diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/package.json b/samples/openapi3/client/petstore/typescript/builds/browser/package.json index 75f0bc16826..c1cb8657b44 100644 --- a/samples/openapi3/client/petstore/typescript/builds/browser/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/browser/package.json @@ -15,8 +15,6 @@ ], "license": "Unlicense", "main": "./dist/index.js", - "type": "module", - "module": "./dist/index.js", "exports": { ".": { "import": "./dist/index.js", diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json index 75f0bc16826..c1cb8657b44 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json @@ -15,8 +15,6 @@ ], "license": "Unlicense", "main": "./dist/index.js", - "type": "module", - "module": "./dist/index.js", "exports": { ".": { "import": "./dist/index.js", diff --git a/samples/openapi3/client/petstore/typescript/builds/default/package.json b/samples/openapi3/client/petstore/typescript/builds/default/package.json index d35909520dc..29b42f0b0ff 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/default/package.json @@ -15,8 +15,6 @@ ], "license": "Unlicense", "main": "./dist/index.js", - "type": "module", - "module": "./dist/index.js", "exports": { ".": { "import": "./dist/index.js", diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/package.json b/samples/openapi3/client/petstore/typescript/builds/inversify/package.json index 4cbafe1972c..12c5e8be927 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/package.json @@ -15,8 +15,6 @@ ], "license": "Unlicense", "main": "./dist/index.js", - "type": "module", - "module": "./dist/index.js", "exports": { ".": { "import": "./dist/index.js", diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/package.json b/samples/openapi3/client/petstore/typescript/builds/jquery/package.json index 180967bc8f0..7db30d7a032 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/package.json @@ -15,8 +15,6 @@ ], "license": "Unlicense", "main": "./dist/index.js", - "type": "module", - "module": "./dist/index.js", "exports": { ".": { "import": "./dist/index.js", diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/package.json b/samples/openapi3/client/petstore/typescript/builds/object_params/package.json index d35909520dc..29b42f0b0ff 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/package.json @@ -15,8 +15,6 @@ ], "license": "Unlicense", "main": "./dist/index.js", - "type": "module", - "module": "./dist/index.js", "exports": { ".": { "import": "./dist/index.js",