Skip to content

fix: correctly configure module and noEmit tsconfig and jsconfig properties #11029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Nov 14, 2023
5 changes: 5 additions & 0 deletions .changeset/perfect-seahorses-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-svelte': patch
---

fix: correctly configure `module` and `noEmit` tsconfig and jsconfig properties
3 changes: 2 additions & 1 deletion packages/create-svelte/shared/+checkjs/jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true
"strict": true,
"moduleResolution": "bundler"
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias and https://kit.svelte.dev/docs/configuration#files
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "NodeNext"
"moduleResolution": "bundler"
}
}
3 changes: 2 additions & 1 deletion packages/create-svelte/shared/+typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true
"strict": true,
"moduleResolution": "bundler"
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
//
Expand Down
1 change: 1 addition & 0 deletions packages/kit/src/core/sync/write_tsconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export function get_tsconfig(kit, include_base_url) {
lib: ['esnext', 'DOM', 'DOM.Iterable'],
moduleResolution: 'node',
module: 'esnext',
noEmit: true, // prevent tsconfig error "overwriting input files" - Vite handles the build and ignores this
target: 'esnext',

// TODO(v2): use the new flag verbatimModuleSyntax instead (requires support by Vite/Esbuild)
Expand Down