Skip to content

Vite v8 support#38

Open
retlehs wants to merge 1 commit intomainfrom
vite-v8
Open

Vite v8 support#38
retlehs wants to merge 1 commit intomainfrom
vite-v8

Conversation

@retlehs
Copy link
Member

@retlehs retlehs commented Mar 22, 2026

Summary

  • Update plugin for Vite 8 / Rolldown compatibility
  • Import Rolldown.InputOptions from vite namespace (replaces rollup import)
  • Add moduleType: 'js' to transform() return for Rolldown module type detection
  • Rename build.rollupOptionsbuild.rolldownOptions in build tests
  • Bump peer dependency to vite ^8.0.0
  • Bump Node.js engines to ^20.19.0 || >=22.12.0
  • Bump esbuild to 0.27.4
  • Version 2.0.0

Closes #37

Upgrading

Requires vite ^8.0.0, laravel-vite-plugin ^3.0.0, and node ^20.19.0 || >=22.12.0.

In vite.config.js, move import.meta.glob asset patterns to the assets option on laravel-vite-plugin:

     laravel({
       input: [
         'resources/css/app.css',
         'resources/js/app.js',
         'resources/css/editor.css',
         'resources/js/editor.js',
       ],
       refresh: true,
+      assets: ['resources/images/**', 'resources/fonts/**'],
     }),

In resources/js/app.js, remove the import.meta.glob call:

-import.meta.glob([
-  '../images/**',
-  '../fonts/**',
-]);

See also roots/sage#3283.

Test plan

  • npm run build passes
  • npm test — all 87 tests pass
  • Manual test with Sage project on Vite 8
  • Manual test with Radicle project on Vite 8
  • Verify editor.deps.json emitted correctly
  • Verify theme.json generation
  • Verify HMR in WordPress editor
  • Review Sage/Radicle docs

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@retlehs retlehs changed the title Vite 8 support Vite v8 support Mar 22, 2026
@retlehs retlehs marked this pull request as ready for review March 22, 2026 15:55
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.

Upgrade to Vite v8

1 participant