Skip to content

Commit

Permalink
fix: Add nodenext option (#5177)
Browse files Browse the repository at this point in the history
* add nodenext option

* add changeset

* Update .changeset/chilled-colts-heal.md

---------

Co-authored-by: Zhongpin Wang <[email protected]>
  • Loading branch information
deekshas8 and ZhongpinWang authored Nov 14, 2024
1 parent 5808573 commit 745766e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/chilled-colts-heal.md
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 2 additions & 1 deletion packages/generator-common/src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()]) {
Expand Down

0 comments on commit 745766e

Please sign in to comment.