feat: support Vite 8 with the Rolldown bundler - #8909
Open
maiieul wants to merge 22 commits into
Open
Conversation
🦋 Changeset detectedLatest commit: 240c3d5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
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: |
Contributor
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
maiieul
force-pushed
the
feat/vite8-rolldown
branch
from
August 4, 2026 05:05
860e4fa to
d45c410
Compare
maiieul
force-pushed
the
feat/vite8-rolldown
branch
from
August 5, 2026 13:26
d45c410 to
617b449
Compare
Vite 8 bundles rolldown; pin 8.2.x so the lockfile resolves rolldown >=1.2.1, which fixes an init-order bug with codeSplitting and CJS deps.
Renames the standalone plugin to qwikRolldown (qwikRollup stays as a deprecated alias) and swaps manualChunks for rolldown's codeSplitting groups, which replace Rollup 4.52's onlyExplicitManualChunks with includeDependenciesRecursively:false. The manifest now finds core and preloader by group name, and the qwikloader by its emit reference so a user route named /qwikloader can't shadow it. outputOptions is a sync hook, so it no longer returns a promise — the standalone plugin was silently dropping Qwik's chunking (the docs REPL built its own chunks).
handleHotUpdate becomes the per-environment hotUpdate hook, the watcher takes plain directories now that chokidar 4 has no glob support, and the placeholder regexes accept backticks because oxc re-emits string literals as template literals.
The raw-source load hook has to run first, otherwise Vite's wasm helper tries to parse the raw .wasm source as a real module. The old manualChunks override for the REPL is gone with manualChunks itself.
Covers the e2e fixtures, starters, scripts and the remaining package configs, plus the two e2e assertions that track the new bundler's output (inline CSS minification and the slightly larger core chunk).
Vite 8 leaves the compiled executor ending in a line comment, which swallowed the closing brace of the wrapper and threw SyntaxError in the browser.
maiieul
force-pushed
the
feat/vite8-rolldown
branch
from
August 17, 2026 09:46
617b449 to
6b5d8eb
Compare
Vite forces preserve_annotations for es lib builds, so terser kept a pure annotation that rolldown then reports as invalid. Rolldown's own minifier drops the comments and lets the terser config go.
Only the vite plugin was setting it, so rolldown warned that it had to infer it from our codeSplitting options.
maiieul
force-pushed
the
feat/vite8-rolldown
branch
from
August 17, 2026 12:32
44ba5c4 to
b7de147
Compare
Rolldown 1.2.4 may mangle the export names of group chunks and emit separate facade chunks for the preloader and handlers entries, so the manifest pointed symbols at chunks whose exports no longer carry their names. Prefer the emitted facade when it exists in the output; fall back to the group chunk when the bundler merged the entry into it.
Matches what users installing today resolve, so CI exercises rolldown's newer chunk-export mangling.
…t own it Nothing sets 'exports-only' — it is rolldown's default, invalid with the codeSplitting the plugin configures. The vite plugin already sets 'allow-extension' where it builds the config; the repl now does the same at its rolldown() call instead of the standalone plugin patching it in a hook.
Rolldown rejects the path-returning manualChunks compat on the ssr build: chunk names may not be paths in the chunkFileNames pattern.
segment.entry has one consumer, so normalize it there instead of mutating the transform output.
It only shaped debug-mode chunk names; sanitization is all the bundler needs.
Rolldown's default attachDebugInfo 'simple' writes provenance comments into unminified output, which lib-mode builds publish.
Main added qwik-utils pinned to vite 7.3.5, so the merged lockfile referenced a vite 7 entry this branch had removed and --frozen-lockfile refused to install.
packages/docs does not depend on rolldown directly, so the docs tsc build could not resolve the type.
The test kept its own copy of the sanitizer, which missed backslashes and failed on windows.
Varixo
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is it?
Description
Qwik v2 now needs Vite 8 and bundles with rolldown. Vite 5-7 and Rollup are dropped, so this is a
breaking change. It's the minimal slice of #8785 — Brian is busy, so I'm carrying it. Stacked on
#8907 and #8908; those land first and the diff shrinks. The sensitive part is chunking:
manualChunks+onlyExplicitManualChunksbecome rolldown'scodeSplittinggroups +includeDependenciesRecursively: false, which buys the same thing — a grouped module no longerdrags its deps into the chunk. Green: prod build, 3201 unit tests, 487/487 chromium e2e, SSG
html/state snapshot and size budgets unchanged, docs REPL still working.
Chunking, the part worth reviewing
codeSplittinggroups. The manifest finds them by group name./qwikloaderroute can't shadow it.priority.strictExecutionOrder— it breaks preloading.The dist build is untouched
vite.build()option keys, so the shippedcore.prod.mjs/core.min.mjs/ preloader are byte-for-byte what main produces.Three bugs found while verifying
stayed dead. Unit tests missed it because they call the manifest directly. Only e2e caught it.
outputOptionsis a sync hook, but ours returned a promise. The standaloneqwikRolldownpluginwas therefore applying no Qwik chunking at all. That is what broke the REPL. Now fixed, so
standalone rolldown users get Qwik chunking for the first time.
closing brace of its wrapper and threw
SyntaxErrorin the browser.Where this differs from #8785
codeSplitting+ CJS deps.test.fixme'd.