Svelte

known issues with vite 8 beta and svelte

#1143

Development PRs

Issue

Open
D
dominikg
Jun 17, 2025, 8:29 AM

[!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

  • server output can contain code that should only be added to client

    This can lead to much larger output for server bundles, including broken apps.

    Example: svelte exports onMount as a noop ()=>{} unless the 'browser' exports condition is active so code like onMount(()=>doClientThings()) should not lead to any output for the server

    If 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

dev

  • optimizing svelte components can with an invalid sourcemap error, caused by svelte or esrap emitting a negative sourcemap position

enableNativePlugins

👍 27👀 2

Info

Assignees None
Labels None
Milestone v7

Pro tip: You can prefix GitHub URLs of issues, PRs or discussions with svcl.dev/ to view them on this page! Also try it on a GitHub release ;)