Update dependency @vitejs/plugin-vue to v6 - #2859
Conversation
b37f9e8 to
2a50c3e
Compare
2a50c3e to
816b67c
Compare
053c4e9 to
04022c6
Compare
73b9770 to
a4ca03f
Compare
a4ca03f to
4aeb183
Compare
There was a problem hiding this comment.
(From Claude) Checked this bump against the current tree. Nothing in web/src breaks today — the built JS is byte-identical to master and total CSS byte count is unchanged — but v6 has three behavior changes that silently void assumptions we currently rely on.
Requested before merge: the one-line include: /\.vue$/ fix in web/vite.config.mts (item 1), and propagating the raised Node floor to devEngines + netlify.toml (item 3). Item 2 is informational.
1. vite-plugin-vuetify's auto-import filter degrades to match-everything
v6 moved include/exclude off the plugin's public api.options onto api.include/api.exclude. vite-plugin-vuetify@2.1.0 reads api.options.include, so it now gets undefined, and createFilter(undefined, undefined) matches every non-virtual id. Its vuetify:import transform goes from running on .vue files only to running over the whole module graph (~1550 modules).
No damage today — nothing in web/src/**/*.{ts,js} contains resolveComponent, and no bundled dep triggers it either (hence the identical JS). But any .ts/.js module or dependency shipping SFC-compiled _resolveComponent("X") render code would get its runtime lookup rewritten to a static Vuetify import.
Upgrading the vuetify plugin doesn't help — 2.1.3 still reads api.options.include. The fix is one line in web/vite.config.mts:
Vue({ include: /\.vue$/ })2. Scoped CSS is reordered in the production bundle
v6 attaches meta.vite.cssScopeTo to <style scoped> blocks, which makes Vite relocate scoped CSS to the SFC module's position in the chunk rather than the style-import position. Building the same web/src before/after produces the same rules in a different order.
Only DandisetSearchField.vue has both a scoped and an unscoped block, and its selectors are disjoint (.search-field-form / .advanced-search-help vs .operator-suggestions), so nothing regresses. Worth knowing that a later unscoped <style> block no longer reliably overrides an equal-specificity rule from the same file's earlier <style scoped> block — and that dev mode still emits declaration order, so a future conflict would be prod-only.
Relatedly, cssScopeTo also flips those modules from moduleSideEffects: "no-treeshake" to false, gating CSS emission on the SFC's default export surviving tree-shaking. Nothing is pruned today (no defineAsyncComponent, no global app.component() registration), but the emission is now conditional where it previously was not.
3. Node floor is raised but not propagated
v6 dropped v5's crypto.hash ?? createHash(...) fallback and calls crypto.hash unconditionally, so the real floor is now Node 20.12+; the lockfile records ^20.19.0 || >=22.12.0. Two places still disagree:
web/package.jsondevEngines.runtime.versionis">=20", which green-lights 20.0–20.11 where the build now dies on the first.vuefile withTypeError: crypto.hash is not a function.web/netlify.tomlpinsNODE_VERSION = "20"in all four contexts including[context.release]. A bare major has no floor; it works only because Netlify's image resolves it to a recent 20.x.
CI runs Node 24 only, so the deploy runtime isn't exercised either way (pre-existing, not introduced here). Suggest bumping devEngines to match the lockfile and pinning NODE_VERSION to a concrete version.
@vitejs/plugin-vue 6 dropped v5's `crypto.hash ?? createHash(...)` fallback and calls `crypto.hash` unconditionally, which requires Node 20.12+. The package declares `^20.19.0 || >=22.12.0`, but two places still allowed older runtimes: - `devEngines.runtime.version` was `>=20`, which green-lit Node 20.0-20.11 where the build now fails on the first .vue file with `TypeError: crypto.hash is not a function`. - `netlify.toml` set `NODE_VERSION = "20"` in all four contexts. A bare major has no floor and only worked because Netlify's build image happens to resolve it to a recent 20.x. Match devEngines to the lockfile requirement and pin Netlify to an explicit 20.19.0 so the deploy runtime is reproducible. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
@vitejs/plugin-vue v6 no longer seeds its default `include` (/\.vue$/) into `api.options` — the value now lives on the separate `api.include` accessor. vite-plugin-vuetify still builds its auto-import filter with `createFilter(api.options.include, api.options.exclude)`, so under v6 it receives `undefined` and produces a filter that matches every module instead of only .vue files, running its `vuetify:import` transform over the whole module graph. Passing the plugin's own default explicitly restores the previous filter, since `rawOptions` is still spread into `options`. Verified against plugin-vue 6.0.8: without this, `api.options.include` is `undefined` and the filter matches src/main.ts; with it, the filter matches only .vue. Upgrading vite-plugin-vuetify does not help — 2.1.3 reads `api.options` the same way. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This PR contains the following updates:
5.2.1→6.0.8Release Notes
vitejs/vite-plugin-vue (@vitejs/plugin-vue)
v6.0.8Features
Bug Fixes
v6.0.7Features
@rolldown/pluginutilsversion (#776) (941b651)Bug Fixes
v6.0.6Features
Bug Fixes
Miscellaneous Chores
v6.0.5Miscellaneous Chores
v6.0.4Bug Fixes
Miscellaneous Chores
v6.0.3Features
Bug Fixes
Performance Improvements
Miscellaneous Chores
v6.0.2Bug Fixes
Miscellaneous Chores
v6.0.1Bug Fixes
Performance Improvements
debug(#627) (9dfa996)Miscellaneous Chores
Build System
v6.0.0Bug Fixes
Miscellaneous Chores
descriptionandkeywordsfield to package.json (#604) (67ab76b)Code Refactoring
crypto.hash(#606) (5de85f6)v5.2.4Features
transformWithOxcifrolldown-viteis detected (#584) (6ac8e3a)Bug Fixes
Miscellaneous Chores
v5.2.35.2.3 (2025-03-17)
v5.2.2Features
Bug Fixes
define(#545) (46d3d65)Miscellaneous Chores
resolveddeclaration (7288a59)Configuration
📅 Schedule: (UTC)
* 0-3 1 * *)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.