feat: support Vite 8 with the Rolldown bundler#8785
Conversation
🦋 Changeset detectedLatest commit: 3bd4b89 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@qwik.dev/core
@qwik.dev/router
eslint-plugin-qwik
create-qwik
@qwik.dev/optimizer
@qwik.dev/devtools
commit: |
c54c8b1 to
02a5bf8
Compare
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
|
looks great but at this point I don't think we want to require Vite 8 yet. Can't we already get some of this with Vite 6 or 7? |
It seems you could feasibly use Rolldown with Vite 7 via the |
|
I see two changes here: the graph fix and the vite8. Ideally, the graph fix is a separate PR. For vite8, I see that the incompatibility is mostly the config options? Can't we detect the vite version and use the correct key based on that? Vite 8 has some breaking changes around CJS compatibility, and if we can prolong vite 7 compatibility, we should. |
It's not just the config options key, unfortunately. |
7dffc1a to
71fe016
Compare
c2ac019 to
2696b69
Compare
Vite 8 is now required (peer >=8 <9); Vite ≤7 and Rollup are dropped. Migrates the qwik-vite plugin, qwik-router adapters, and build scripts to Rolldown (codeSplitting groups, chunk-name manifest detection), plus the rolldown-specific fixes the SSG and suspense/CSR e2e suites surfaced.
Per-bundle transitive reduction severed covering paths that ran back through import cycles, collapsing cyclic bundles to zero preload deps (cold-nav chunk waterfall). Reduce via SCC condensation instead, extracted as a shared condenseImportGraph and reused by computeTotals.
Swap terser for esbuild for all dist minification (core, server, preloader, qwikloader, compiled-string). terser mispositions @__PURE__ before return/case tokens, which Rolldown rejects as INVALID_ANNOTATION and drops costing consumers downstream tree-shaking. esbuild positions them validly. - preserve $…$ property mangling via esbuild mangleProps + a shared mangleCache (cross-bundle consistent); mangleQuoted keeps dotted and quoted property access in sync - skip minifyWhitespace on annotation-bearing bundles (it strips @__PURE__; consumers re-minify whitespace anyway) - move dev-strip (qDev/qInspector/…) to the Rolldown-stage `define` - drop the terser dependency
No description provided.