Skip to content

feat: support Vite 8 with the Rolldown bundler#8785

Open
briancarbone wants to merge 4 commits into
QwikDev:build/v2from
briancarbone:feat/vite8
Open

feat: support Vite 8 with the Rolldown bundler#8785
briancarbone wants to merge 4 commits into
QwikDev:build/v2from
briancarbone:feat/vite8

Conversation

@briancarbone

Copy link
Copy Markdown

No description provided.

@briancarbone briancarbone requested review from a team as code owners June 30, 2026 19:11
@changeset-bot

changeset-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest 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

@briancarbone briancarbone marked this pull request as draft June 30, 2026 19:11
@pkg-pr-new

pkg-pr-new Bot commented Jun 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

@qwik.dev/core

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@8785

@qwik.dev/router

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@8785

eslint-plugin-qwik

npm i https://pkg.pr.new/QwikDev/qwik/eslint-plugin-qwik@8785

create-qwik

npm i https://pkg.pr.new/QwikDev/qwik/create-qwik@8785

@qwik.dev/optimizer

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/optimizer@8785

@qwik.dev/devtools

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/devtools@8785

commit: 3bd4b89

@briancarbone briancarbone force-pushed the feat/vite8 branch 2 times, most recently from c54c8b1 to 02a5bf8 Compare June 30, 2026 19:36
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview 3bd4b89

@briancarbone briancarbone marked this pull request as ready for review June 30, 2026 21:27
@briancarbone briancarbone mentioned this pull request Jul 1, 2026
@wmertens

wmertens commented Jul 1, 2026

Copy link
Copy Markdown
Member

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?

@briancarbone

Copy link
Copy Markdown
Author

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 rolldown-vite package... I hasten to wonder whether the version restriction could be relaxed without any other changes.

@wmertens

wmertens commented Jul 2, 2026

Copy link
Copy Markdown
Member

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.

@briancarbone

Copy link
Copy Markdown
Author

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. manualChunks was removed in Rolldown, first replaced by advancedChunks and then codeSplitting, so the chunk backend (rollup vs. rolldown) is sufficiently different.

@briancarbone briancarbone marked this pull request as draft July 3, 2026 04:17
@briancarbone briancarbone force-pushed the feat/vite8 branch 5 times, most recently from 7dffc1a to 71fe016 Compare July 3, 2026 20:12
@briancarbone briancarbone marked this pull request as ready for review July 3, 2026 20:34
@briancarbone briancarbone force-pushed the feat/vite8 branch 2 times, most recently from c2ac019 to 2696b69 Compare July 3, 2026 23:28
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants