[proposal] Support Rolldown for Qwik’s Vite plugin #250
Replies: 2 comments
-
|
hmm interesting, I had it working with the manualChunks just after it got merged, I think. So a bug on their side. In any case, the resulting build had issues with css. But I don't think we need to make any changes on the Qwik side to make it work. just use pnpm overrides to set vite to rolldown-vite and to pin rolldown to the version you want. |
Beta Was this translation helpful? Give feedback.
-
|
Yes this is definitely on our radar. I tried it too about a month ago and the preloader wouldn't work on v1. But the app was reactive though so that may be a new bug, unless it happens only on v2. It seems you've been able to dig around the code a little bit already so if you want to champion this I think we'll happily go to stage 2 and provide help/guidance as much as we can (given we're all quite busy atm). This might not be that much code to change, but we need to make sure the core features (reactivity, preloading, router, insights, etc.) all work seemlessly under rolldown (at least on v2). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What is it about?
No response
What's the motivation for this proposal?
Vite is planning to integrate Rolldown, a new JavaScript bundler that is faster.
Projects using Vite can switch to rolldown-vite by doing this in
package.json:{ "dependencies": { - "vite": "^7.0.0" + "vite": "npm:rolldown-vite@latest" } }The most significant change of rolldown-vite is that
manualChunksis deprecated, andadvancedChunksshould be used instead. API Differences:manualChunkstoadvancedChunksThere’s compat code for
manualChunks, unfortunately it doesn’t work forqwik buildat the moment:Reproduce:
See Qwik
manualChunksand rolldown-vitebindingifyAdvancedChunks.I think Qwik need to implement
advancedChunksbefore Qwik 2 release :)Proposed Solution / Feature
See example provided by vite:
And looking into
bindingifyAdvancedChunkscan be helpful:But note that
ModuleInfois also unsupported by rolldown, while Qwik currently looks into the (incomplete) module info. Probably we need a new approach doing chunks.Links / References
Vite rolldown guide
Qwik
manualChunksimplementationRolldown
bindingifyAdvancedChunksimplementationBeta Was this translation helpful? Give feedback.
All reactions