Description
Note
This is a meta-issue, content below is updated but not guaranteed to be up2date or complete.
Please comment if something is fixed or an issue comes up that isn't listed here.
Issues mentioning svelte in rolldown-vite and rolldown
build
Caution
the issues mentioned below can lead to larger build output and broken applications, do not deploy in production.
-
fails to remove dead code
code paths using
if(condition)
from `esm-env' are not removed when the condition is false
[Feature Request]: cross chunk dead code elimination depending on constant inlining / propergation rolldown/rolldown#4786
[Bug]: Rolldown cannot treeshake unused branch rolldown/rolldown#4258
Bundle size is 19kB (31%) bigger with svelte project vitejs/rolldown-vite#229This leads to larger output (eg development errorhandling is kept), but the app should still work as expected
-
server output can contain code that should only be added to client
[Feature Request]: remove non used dynamic import chunks rolldown/rolldown#3403
This can lead to much larger output for server bundles, including broken apps.
Example:
svelte exportsonMount
as a noop()=>{}
unless the 'browser' exports condition is active so code likeonMount(()=>doClientThings())
should not lead to any output for the serverIf doClientThings imported a large library that expects browser globals to be available, it'll crash the server. Even if the app keeps working it can put large client only libraries into the server bundle which can be very bad on edge deployments.
-
emits empty css chunks
empty CSS chunks are emitted for each Svelte file and they're also not in the Vite manifest, causing read errors when sveltekit traverses CSS imports for mapping/inlining
Extra empty CSS chunks when returning CSS in theload
plugin hook vitejs/rolldown-vite#267
dev
currently no known issues for vite dev