Skip to content

Commit 745766e

Browse files
fix: Add nodenext option (#5177)
* add nodenext option * add changeset * Update .changeset/chilled-colts-heal.md --------- Co-authored-by: Zhongpin Wang <[email protected]>
1 parent 5808573 commit 745766e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/chilled-colts-heal.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sap-cloud-sdk/generator-common': minor
3+
---
4+
5+
[Fixed Issue] Fix ESM client code compilation by allowing the `module` option to be set to `nodenext` in a custom `tsconfig.json` file.

packages/generator-common/src/compiler.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ function parseModuleKind(input: string): ModuleKind {
255255
amd: ModuleKind.AMD,
256256
es2015: ModuleKind.ES2015,
257257
es2020: ModuleKind.ES2020,
258-
esnext: ModuleKind.ESNext
258+
esnext: ModuleKind.ESNext,
259+
nodenext: ModuleKind.NodeNext
259260
};
260261

261262
if (mapping[input.toLowerCase()]) {

0 commit comments

Comments
 (0)