kit
kit copied to clipboard
Improved Vite rolldown support
Describe the bug
Let's get it passing on the ecosystem CI
Here are some blockers for us:
- [ ] treeshaking/dead code removal in rolldown is not on the same level as rollups, leading to compatibility issues with some svelte features for serverside bundles https://github.com/rolldown/rolldown/issues/3403
- [ ] empty CSS chunks are emitted for each Svelte file and they're also not in the Vite manifest, causing read errors when we try traverse CSS imports for mapping/inlining https://github.com/vitejs/rolldown-vite/issues/267
- [x]
viteMetadatais missing from the chunks in the SSR bundle output data. We use it to map the SSR stylesheets to the client ones for inlining CSS https://github.com/vitejs/rolldown-vite/issues/264
Nice to haves
- [ ] figure out how to get
experimental.enableNativePluginsworking https://vite.dev/guide/rolldown#enabling-native-plugins currently it causes styles to not be applied. Likely the reason is that the generated manifest doesn't include style information and therefore not loaded. Possibly related? https://github.com/vitejs/rolldown-vite/issues/213
Reproduction
https://github.com/vitejs/vite-ecosystem-ci/actions/runs/14633802080/job/41060843890
Logs
System Info
rolldown
Severity
blocking an upgrade
Additional Information
Some tips: https://main.vitejs.dev/guide/rolldown.html#plugin-framework-authors-guide
Not sure where to put, but I'm running into an issue where if I have duplicately named files, it causes overwriting. So I have a Alert.svelte in both $lib/ui and $lib/yuzui and the latter gets overwritten by the former in the final build. Interestingly, it's not just .svelte files. I have a file called ClaimsRouting.svelte and claimsRouting.ts that also overwrite each other.
@ryanylee in a separate issue with a link to a minimal reproduction. Please make sure to mention rolldown-vite and the exact versions you use.
@eltigerchino is the enableNativePlugin issue referred to here still an issue? I see references in https://github.com/sveltejs/vite-plugin-svelte/issues/1143 to native plugin css issues having been resolved, so I'm wondering if we should close this issue
@eltigerchino is the
enableNativePluginissue referred to here still an issue? I see references in sveltejs/vite-plugin-svelte#1143 to native plugin css issues having been resolved, so I'm wondering if we should close this issue
Yes, I do think it's a separate issue. In this case, the css metadata is simply missing from the Vite manifest
~~#14739 prevents building using remote function + rolldown, related to upstream issue https://github.com/rolldown/rolldown/issues/6674~~
should be fixed with https://github.com/rolldown/rolldown/releases/tag/v1.0.0-beta.48