known issues with vite 8 beta and svelte
#1143
Development PRs
Bumps the development-dependencies group with 1 update: vite.
Updates vite from 7.3.1 to 8.0.0
Release notes
Sourced from vite's releases.
[email protected]
Please refer to CHANGELOG.md for details.
[email protected]
Please refer to CHANGELOG.md for details.
v8.0.0
Please refer to CHANGELOG.md for details.
v8.0.0-beta.18
Please refer to CHANGELOG.md for details.
v8.0.0-beta.17
Please refer to CHANGELOG.md for details.
v8.0.0-beta.16
Please refer to CHANGELOG.md for details.
v8.0.0-beta.15
Please refer to CHANGELOG.md for details.
v8.0.0-beta.14
Please refer to CHANGELOG.md for details.
v8.0.0-beta.13
Please refer to CHANGELOG.md for details.
v8.0.0-beta.12
Please refer to CHANGELOG.md for details.
v8.0.0-beta.11
Please refer to CHANGELOG.md for details.
v8.0.0-beta.10
Please refer to CHANGELOG.md for details.
v8.0.0-beta.9
Please refer to CHANGELOG.md for details.
v8.0.0-beta.8
Please refer to CHANGELOG.md for details.
v8.0.0-beta.7
Please refer to CHANGELOG.md for details.
v8.0.0-beta.6
Please refer to CHANGELOG.md for details.
v8.0.0-beta.5
Please refer to CHANGELOG.md for details.
... (truncated)
Changelog
Sourced from vite's changelog.
8.0.0 (2026-03-12)
Today, we're thrilled to announce the release of the next Vite major:
- Vite 8.0 announcement blog post
- Docs (translations: 简体中文, 日本語, Español, Português, 한국어, Deutsch, فارسی)
- Migration Guide
⚠ BREAKING CHANGES
- remove
import.meta.hot.acceptresolution fallback (#21382)- update default browser target (#21193)
- the epic
rolldown-vitemerge (#21189)Features
- update rolldown to 1.0.0-rc.9 (#21813) (f05be0e)
- warn when
vite-tsconfig-pathsplugin is detected (#21781) (ada493e)- css: support es2025 build target for lightningcss (#21769) (08906e7)
- forward browser console logs and errors to dev server terminal (#20916) (2540ed0)
- update rolldown to 1.0.0-rc.8 (#21790) (a0c950e)
- export
VisitorandESTreefromrolldown/utils(#21664) (45de31e)- update rolldown to 1.0.0-rc.6 (#21714) (37a65f8)
- use util.inspect for CLI error display (#21668) (5f425a9)
- update rolldown to 1.0.0-rc.5 (#21660) (b3ddbc5)
- update rolldown to 1.0.0-rc.4 (#21617) (1ee5c7f)
- wasm: add SSR support for
.wasm?init(#21102) (216a3b5)- integrate devtools (#21331) (acbf507)
- update rolldown to 1.0.0-rc.3 (#21554) (43358e9)
- manifest: add
assetsfield for standalone CSS entry points (#21015) (f289b9b)- update rolldown to 1.0.0-rc.2 (#21512) (fa136a9)
- bundled-dev: support worker in initial bundle (#21415) (f3d3149)
- dev: detect port conflicts on wildcard hosts (#21381) (b0dd5a9)
- shortcuts case insensitive (#21224) (7796ade)
- update rolldown to 1.0.0-rc.1 (#21463) (ff9dd7f)
- warn if
envPrefixcontains spaces (#21292) (9fcde3c)- update rolldown to 1.0.0-beta.60 (#21408) (c33aa7c)
- update rolldown to 1.0.0-beta.59 (#21374) (0037943)
- add
ignoreOutdatedRequestsoption tooptimizeDeps(#21364) (b2e75aa)- add ios to default esbuild targets (#21342) (daae6e9)
- update rolldown to 1.0.0-beta.58 (#21354) (ba40cef)
- update rolldown to 1.0.0-beta.57 (#21335) (d5412ef)
- css: support es2024 build target for lightningcss (#21294) (bd33b8e)
- update rolldown to 1.0.0-beta.56 (#21323) (9847a63)
- introduce v2 native plugins and enable it by default (#21268) (42f2ab3)
- ssr: avoid errors when rewriting already rewritten stacktrace (#21269) (98d9a33)
- update rolldown to 1.0.0-beta.55 (#21300) (2c8db85)
- update rolldown to 1.0.0-beta.54 (#21267) (c751172)
... (truncated)
Commits
ea68a88chore(deps): update rolldown-related dependencies (#20810)693d255release: v7.1.798a3484fix(hmr): wait forimport.meta.hot.prunecallbacks to complete before runni...9f32b1dfix(hmr): trigger prune event when import is removed from non hmr module (#20...9f2247cfix(deps): update all non-major dependencies (#20811)105abe8fix(glob): handle glob imports from folders starting with dot (#20800)4c4583cfix(build): fix ssr environmentemitAssets: truewhen `sharedConfigBuild: t...9bc9d12fix(client): use CSP nonce when rendering error overlay (#20791)54377f7release: v7.1.688af2aefix(deps): update all non-major dependencies (#20773)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore <dependency name> major versionwill close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)@dependabot ignore <dependency name> minor versionwill close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)@dependabot ignore <dependency name>will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)@dependabot unignore <dependency name>will remove all of the ignore conditions of the specified dependency@dependabot unignore <dependency name> <ignore condition>will remove the ignore condition of the specified dependency and ignore conditions
Summary
- Updates
@sveltejs/vite-plugin-sveltefrom v4 to v6 to fix the Render deploy failure - Dependabot bumped vite from v5 to v6 (PR #45) but didn't update the Svelte plugin, which only supported Vite 5
- The v4 plugin didn't configure the
"svelte"export condition for Vite 6's SSR resolver, causing@iconify/svelteresolution to fail
Test plan
-
pnpm run buildsucceeds locally with Vite 6.4.2
Made with Cursor
Summary by CodeRabbit
- Chores
- Requires Node.js 20.19 or newer for running the project.
- Updated Svelte/Vite build plugin to a newer compatible version for improved tooling.
- Adjusted TypeScript compiler behavior to preserve module syntax changes affecting build/validation.
Issue
[!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 rolldown/rolldown#4786 rolldown/rolldown#4258 - remove code that relies on the value of itself (eg svelte hydrate condition ) vitejs/vite#21944 rolldown/rolldown#6945 oxc-project/oxc#14001 rolldown/rolldown#8195 This leads to larger output (eg development errorhandling is kept), but the app should still work as expected
- code paths using
-
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
onMountas 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 vitejs/rolldown-vite#267
dev
- optimizing svelte components can with an invalid sourcemap error, caused by svelte or esrap emitting a negative sourcemap position sveltejs/svelte#17003
enableNativePlugins
-
css is not applied
Info
added empty css chunks vitejs/rolldown-vite#267
added "css is not applied" and reformatted so that issue status is rendered on link
marked vitejs/rolldown-vite#213 as resolved, local testing with [email protected] shows css applied, emitted css for enableNativePlugin: true is equal to enableNativePlugin: false
added rolldown/rolldown#6945
When using rolldown-vite I'm getting the following errors in my test cases, which don't happen without, see:
added optimizeDeps sourcemap issue (only affects dev)
optimizeDeps sourcemap issue fixed in [email protected]
added oxc-project/oxc#14001 and grouped it with its related upstream issues
Not sure if this is the best place to put this, or if you want me to open a separate issue, but I just upgraded to vite8 beta and rolldown rc-1, and seeing this warning when loading the application:
9:42:24 am [vite] warning: `optimizeDeps.esbuildOptions` option was specified by "vite-plugin-sveltekit-setup" plugin. This option is deprecated, please use `optimizeDeps.rolldownOptions` instead.
You or a plugin you are using have set `optimizeDeps.esbuildOptions` but this option is now deprecated. Vite now uses Rolldown to optimize the dependencies. Please use `optimizeDeps.rolldownOptions` instead.
and
`inlineDynamicImports` option is deprecated, please use `codeSplitting: false` instead.these are warnings caused by plugins in the sveltekit repo. you can file an issue there if none exists yet.
added rolldown/rolldown#8195 which affects svelte apps that use onMount to prevent large client only modules to be loaded on the server.
eyeing this now that vite 8.0.0 is out
7.0.0 has been released, but it appears to require Vite 8. Does the issue described there not need to be considered for 7.0.0?
For me Svelte5 is mostly broken for Vite 8.
For me Svelte5 is mostly broken for Vite 8.
Describing what "breaks", when and how would be useful. Please be descriptive and helpful, without information and reproduction nothing can be fixed.
I made a starter template using Vite+ and SvelteKit. Vite+ wraps Vite 8 core under the hood ("vite": "npm:@voidzero-dev/vite-plus-core"), so this template runs on Vite v8.0.8 + Rolldown v1.0.0-rc.16. Maybe it helps as a reference.
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 ;)
