Update
Vite 2.7 fixed most issues that users faced. If you're having issues with a library please make sure you're using Vite 2.7. If you're still having problems, please file an issue
Describe the bug
SvelteKit apps are no different from any other Vite app from the most part. The unique things that they do are include vite-plugin-svelte and automatically add Svelte component libraries to optimizeDeps.exclude and ssr.noExternal (this latter functionality may be replaced with the experimental.prebundleSvelteLibraries option)
Blockers
vitejs/vite#2579 / vitejs/vite#3024 / vitejs/vite#3910 (prebundling skips .svelte) - experimental solution. see prebundleSvelteLibraries
vitejs/vite#7154 (externalizing of nested deps) - slated for 2.9
#3118 / #3053 (package.json issues) - fixed in 2.8
vitejs/vite#5890 (not externalizing dependency) - fixed in 2.7
vitejs/vite#3953 (resolving packages with exports) - fixed in 2.7
vitejs/vite#5446 (context="module" not scanned in separate scope) - fixed in 2.7
vitejs/vite#4425 (no main - only sub-directories exported. e.g. firebase) - fixed in 2.7
vitejs/vite#5197 (ESM-only deps) - fixed in 2.7
vitejs/vite#4306 (svelte store functions overwritten) - fixed in 2.6.11
vitejs/vite#4699 (can't use SvelteKit-provided libraries - #2237) - fixed in 2.5.3
vitejs/vite#4452 (resolve .cjs, .mjs) - fixed in 2.5.2
Nice-to-have
vitejs/vite#4192 (process.env on server) - fixed in 2.7
vitejs/vite#5193 (allow export default in template) - fixed in 2.6.8
vitejs/vite#5192 (better error messages for parse failures) - fixed in 2.6.4
vitejs/vite#4426 (surface package resolution failures) - fixed in 2.5.1, but partially rolled back (vitejs/vite#4873)
vitejs/vite#4699 (support application/ld+json) - fixed in 2.5
vitejs/vite#2740 (more SSR tests)
vitejs/vite#2830 (CSS sourcemaps)
vitejs/vite#3928 (debugging support)
Reproduction
In individual Vite bugs
Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
No response
Update
Vite 2.7 fixed most issues that users faced. If you're having issues with a library please make sure you're using Vite 2.7. If you're still having problems, please file an issue
Describe the bug
SvelteKit apps are no different from any other Vite app from the most part. The unique things that they do are include
vite-plugin-svelteand automatically add Svelte component libraries tooptimizeDeps.excludeandssr.noExternal(this latter functionality may be replaced with theexperimental.prebundleSvelteLibrariesoption)Blockers
vitejs/vite#2579 / vitejs/vite#3024 / vitejs/vite#3910 (prebundling skips
.svelte) - experimental solution. seeprebundleSvelteLibrariesvitejs/vite#7154 (externalizing of nested deps) - slated for 2.9
#3118 / #3053 (- fixed in 2.8package.jsonissues)vitejs/vite#5890 (not externalizing dependency)- fixed in 2.7vitejs/vite#3953 (resolving packages with- fixed in 2.7exports)vitejs/vite#5446 (- fixed in 2.7context="module"not scanned in separate scope)vitejs/vite#4425 (no main - only sub-directories exported. e.g. firebase)- fixed in 2.7vitejs/vite#5197 (ESM-only deps)- fixed in 2.7vitejs/vite#4306 (svelte store functions overwritten)- fixed in 2.6.11vitejs/vite#4699 (can't use SvelteKit-provided libraries - #2237)- fixed in 2.5.3vitejs/vite#4452 (resolve- fixed in 2.5.2.cjs,.mjs)Nice-to-have
vitejs/vite#4192 (- fixed in 2.7process.envon server)vitejs/vite#5193 (allow- fixed in 2.6.8export defaultin template)vitejs/vite#5192 (better error messages for parse failures)- fixed in 2.6.4vitejs/vite#4426 (surface package resolution failures)- fixed in 2.5.1, but partially rolled back (vitejs/vite#4873)vitejs/vite#4699 (support- fixed in 2.5application/ld+json)vitejs/vite#2740 (more SSR tests)vitejs/vite#2830 (CSS sourcemaps)
vitejs/vite#3928 (debugging support)
Reproduction
In individual Vite bugs
Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
No response