Skip to content

Commit 766c721

Browse files
committed
TSConfig moduleResolution Node16 (ECMAScript)
1 parent ec51e9c commit 766c721

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tsconfig.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
],
77

88
"compilerOptions": {
9+
/*
10+
Version 1.0.1 of the base `@tsconfig/node20/tsconfig.json` sets [`moduleResolution`][TSConfig moduleResolution] to `node`,
11+
which stands for the CommonJS system of Node.js and doesn't work when Node.js treats files with the extension `.js` as ECMAScript modules.
12+
https://github.com/tsconfig/bases/issues/67
13+
https://github.com/tsconfig/bases/issues/121
14+
https://github.com/tsconfig/bases/pull/197
15+
*/
16+
"moduleResolution": "Node16",
917
"outDir": "dist",
1018
},
1119

@@ -25,4 +33,5 @@
2533
/*
2634
[TSConfig files]: https://www.typescriptlang.org/tsconfig#files
2735
[TSConfig include]: https://www.typescriptlang.org/tsconfig#include
36+
[TSConfig moduleResolution]: https://www.typescriptlang.org/tsconfig#moduleResolution
2837
*/

0 commit comments

Comments
 (0)