Skip to content

Commit 8405e08

Browse files
committed
fix: esm module 99 and cjs module 100
1 parent f35fa37 commit 8405e08

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎.changeset/cool-needles-hear.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/vite-config': patch
3+
---
4+
5+
fix: esm module 99 and cjs module 100

‎packages/vite-config/src/index.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const tanstackViteConfig = (options: Options): UserConfig => {
5757
exclude: options.exclude,
5858
tsconfigPath: options.tsconfigPath,
5959
compilerOptions: {
60-
module: 199, // NodeNext
60+
module: 99, // ESNext
6161
declarationMap: false,
6262
},
6363
beforeWriteFile: (filePath, content) => {
@@ -83,7 +83,7 @@ export const tanstackViteConfig = (options: Options): UserConfig => {
8383
exclude: options.exclude,
8484
tsconfigPath: options.tsconfigPath,
8585
compilerOptions: {
86-
module: 199, // NodeNext
86+
module: 100, // CommonJS - Node16
8787
declarationMap: false,
8888
},
8989
beforeWriteFile: (filePath, content) => {

0 commit comments

Comments
 (0)