You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
breaking: remove baseUrl fallback from generated tsconfig
- don't generate baseUrl anymore and don't adjust paths anymore depending on whether or not the user has paths in their tsconfig.json
- more strict validation: warn on baseUrl/paths and suggest kit.alias instead
closes#11286
Copy file name to clipboardExpand all lines: documentation/docs/60-appendix/30-migrating-to-sveltekit-2.md
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -123,6 +123,10 @@ In SvelteKit 1, those properties included `form` and `data`. These were deprecat
123
123
124
124
If a form contains an `<input type="file">` but does not have an `enctype="multipart/form-data"` attribute, non-JS submissions will omit the file. SvelteKit 2 will throw an error if it encounters a form like this during a `use:enhance` submission to ensure that your forms work correctly when JavaScript is not present.
125
125
126
+
## Generated `tsconfig.json` is more strict
127
+
128
+
Previously, the generated `tsconfig.json` was trying its best to still produce a somewhat valid config when your `tsconfig.json` included `paths` or `baseUrl`. In SvelteKit 2, the validation is more strict and will warn when you use either `paths` or `baseUrl` in your `tsconfig.json`. These settings are used to generate path aliases and you should use [the `alias` config](configuration#alias) option in your `svelte.config.js` instead, to also create a corresponding alias for the bundler.
129
+
126
130
## Updated dependency requirements
127
131
128
132
SvelteKit 2 requires Node `18.13` or higher, and the following minimum dependency versions:
'\nDoing so allows us to omit "baseUrl" — which causes problems with imports — from the generated tsconfig.json. See https://github.com/sveltejs/kit/pull/8437 for more information.'
'`paths` and/or `baseUrl` detected in your tsconfig.json - remove it and use `kit.alias` instead: https://kit.svelte.dev/docs/v2-migration-guide#generated-tsconfigjson-is-more-strict'
0 commit comments