diff --git a/.changeset/chilled-colts-heal.md b/.changeset/chilled-colts-heal.md new file mode 100644 index 0000000000..2e7af62912 --- /dev/null +++ b/.changeset/chilled-colts-heal.md @@ -0,0 +1,5 @@ +--- +'@sap-cloud-sdk/generator-common': minor +--- + +[Fixed Issue] Fix ESM client code compilation by allowing the `module` option to be set to `nodenext` in a custom `tsconfig.json` file. diff --git a/packages/generator-common/src/compiler.ts b/packages/generator-common/src/compiler.ts index 6f5ec6130b..b807258699 100644 --- a/packages/generator-common/src/compiler.ts +++ b/packages/generator-common/src/compiler.ts @@ -255,7 +255,8 @@ function parseModuleKind(input: string): ModuleKind { amd: ModuleKind.AMD, es2015: ModuleKind.ES2015, es2020: ModuleKind.ES2020, - esnext: ModuleKind.ESNext + esnext: ModuleKind.ESNext, + nodenext: ModuleKind.NodeNext }; if (mapping[input.toLowerCase()]) {