Skip to content

Commit 6dc2493

Browse files
fix: esm module 99 and cjs module 100 (#354)
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
1 parent c310c55 commit 6dc2493

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.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)