Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/empty-items-bet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/vite-config': patch
---

fix: declaration resolution where CJS output does not exist for import
4 changes: 2 additions & 2 deletions packages/vite-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const tanstackViteConfig = (options: Options): UserConfig => {
exclude: options.exclude,
tsconfigPath: options.tsconfigPath,
compilerOptions: {
module: 99, // ESNext
module: 199, // NodeNext
declarationMap: false,
},
beforeWriteFile: (filePath, content) => {
Expand All @@ -83,7 +83,7 @@ export const tanstackViteConfig = (options: Options): UserConfig => {
exclude: options.exclude,
tsconfigPath: options.tsconfigPath,
compilerOptions: {
module: 1, // CommonJS
module: 199, // NodeNext
declarationMap: false,
},
beforeWriteFile: (filePath, content) => {
Expand Down
Loading