feat: support Vite 8 with the Rolldown bundler - #8785
Conversation
🦋 Changeset detectedLatest commit: 72d5dd0 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
2696b69 to
c18772e
Compare
12aadd7 to
1902751
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
…nput override is honored
Registered with its default include, imagetools transformed every image import, including ?url/?raw/?inline. sharp reports AVIF as "heif", so those imports were re-encoded and emitted as broken .heif assets. Scope the include to qwik-router's internal qwik-asset-jsx imports so all others pass through to Vite untouched.
- Remove ~33 unused dependencies and fix dependency-section placement
(dependencies vs. devDependencies) across every package.json in the
monorepo
- Replace kleur with picocolors everywhere it was used
- Bump dependency majors and fix the resulting breakage:
- image-size: rewrite to use the library's public imageSize() API
- svgo: fix a broken deep-import (removeViewBox no longer needs
disabling; it's not part of the default preset anymore)
- execa: switch to the execa(options)`cmd` tagged-template idiom,
since execaCommand was removed
- zod: z.Schema -> z.ZodType; zod$/zodQrl now also accept zod/mini
schemas via the variant-agnostic z.core.safeParseAsync and
z.flattenError
- @azure/functions: rewrite the azure-swa middleware for the v4 HTTP
programming model
- which-pm-runs: default -> named export; add a local ambient type
shim (no v2-compatible @types release upstream)
- refractor: deep-import path changed for language grammars
- @napi-rs/cli: flag renames in the native binding build script
…ndor machinery Route validation through the shared `~standard` interface. Add `schema$`, which accepts any Standard Schema validator (zod, valibot, arktype, effect) and infers input/output via `StandardSchemaV1.InferInput`/`InferOutput`. Deprecate `zod$`, `valibot$`, and the re-exported `z` in favor of it (all still work). - one `validateStandardSchema` + `flattenStandardIssues` replaces both per-vendor flatteners and safeParse paths; collapse the vendor validator types into `SchemaDataValidator`; drop the unused `__brand` - valibot is now stable; remove the `valibot` experimental flag - valibot is a type-only import (never in the runtime bundle); zod stays a value import but tree-shakes out of a consumer bundle unless `zod$` is used - add the types-only @standard-schema/spec dependency - whole-field array-type mismatches now key fieldErrors by the field name (e.g. `person`) instead of `person[]`; the spurious empty-path `''` key is gone - docs lead with schema$; unit tests validate zod, zod/mini, valibot, effect, and arktype through the shared path
No description provided.