Skip to content

[6.x] Upgrade to Vite 8#14459

Merged
jasonvarga merged 9 commits into6.xfrom
upgrade-vite-8
Apr 8, 2026
Merged

[6.x] Upgrade to Vite 8#14459
jasonvarga merged 9 commits into6.xfrom
upgrade-vite-8

Conversation

@jasonvarga
Copy link
Copy Markdown
Member

Summary

Upgrades Vite from v7 to v8 (Rolldown-based bundler) along with required dependency changes.

Dependency changes

  • vite ^7.3.2 → ^8.0.0
  • laravel-vite-plugin ^2.0.0 → ^3.0.0 (required for Vite 8)
  • rollup-plugin-visualizer ^5.14.0 → ^7.0.0 (required for Rolldown compatibility)
  • Removed vite-tsconfig-paths — Vite 8 resolves tsconfig paths natively via Rolldown

Config changes (vite.config.js)

  • Removed vite-tsconfig-paths plugin, added resolve.tsconfigPaths: true
  • Moved rollup-plugin-visualizer from build.rollupOptions.output.plugins to top-level plugins array (required by Vite 8)
  • Removed now-empty build.rollupOptions

Code fixes

  • resources/js/index.js — Made import.meta.glob(['../img/**']) eager. Rolldown tree-shakes unused lazy glob results, which removed favicon/image assets from the Vite manifest, breaking Statamic::cpViteAsset() lookups in the CP
  • resources/js/pages/collections/Scaffold.vue — Changed const string bindings to ref() for v-model compatibility. The Vue compiler in this version errors on v-model with non-reactive const bindings in <script setup>
  • resources/css/components/preview.css — Fixed @-4xl/live-preview@4xl/live-preview. The @-{size} syntax was never valid in Tailwind v4; the lockfile regeneration pulled in Tailwind 4.2 which now errors on invalid variants

Test plan

  • npm run build succeeds, favicon entries present in manifest
  • npm run build-dev succeeds, favicon entries present in manifest
  • npm run frontend-build produces resources/dist-frontend/js/helpers.js
  • npm run test — 67 test files, 544 tests pass
  • CP login page loads correctly in browser

jasonvarga and others added 8 commits April 8, 2026 10:06
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Make import.meta.glob eager so Rolldown doesn't tree-shake the image
assets out of the Vite manifest, which broke favicon loading in the CP.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jasonvarga jasonvarga changed the title [6.x] Upgrade Vite 7 to Vite 8 [6.x] Upgrade to Vite 8 Apr 8, 2026
@jasonvarga jasonvarga marked this pull request as ready for review April 8, 2026 17:52
@jasonvarga jasonvarga merged commit ece1486 into 6.x Apr 8, 2026
17 checks passed
@jasonvarga jasonvarga deleted the upgrade-vite-8 branch April 8, 2026 18:25
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.

1 participant