Skip to content

feat: upgrade Vite 7 to Vite 8#23893

Open
Artur- wants to merge 12 commits intomainfrom
feature/vite8
Open

feat: upgrade Vite 7 to Vite 8#23893
Artur- wants to merge 12 commits intomainfrom
feature/vite8

Conversation

@Artur-
Copy link
Member

@Artur- Artur- commented Mar 16, 2026

Vite 8 replaces esbuild and Rollup with Rolldown (Rust-based bundler).

  • Bump vite to ^8.0.0 and @vitejs/plugin-react to ^6.0.0
  • Replace build.rollupOptions with build.rolldownOptions
  • Replace optimizeDeps.esbuildOptions (no longer needed, target already set in build.target)
  • Remove esbuild config (Rolldown preserves legal comments by default)
  • Remove manualChunks workaround (Rolldown handles CJS differently, the commonjsHelpers circular dependency workaround is not needed)
  • Replace RollupOutput with RolldownOutput in service worker plugin
  • Remove esbuild install.js from vaadin-dev-server install-deps script

Vite 8 replaces esbuild and Rollup with Rolldown (Rust-based bundler).

- Bump vite to ^8.0.0 and @vitejs/plugin-react to ^6.0.0
- Replace build.rollupOptions with build.rolldownOptions
- Replace optimizeDeps.esbuildOptions (no longer needed, target already
  set in build.target)
- Remove esbuild config (Rolldown preserves legal comments by default)
- Remove manualChunks workaround (Rolldown handles CJS differently,
  the commonjsHelpers circular dependency workaround is not needed)
- Replace RollupOutput with RolldownOutput in service worker plugin
- Remove esbuild install.js from vaadin-dev-server install-deps script
@github-actions
Copy link

github-actions bot commented Mar 16, 2026

Test Results

 1 386 files  ±0   1 386 suites  ±0   1h 25m 1s ⏱️ - 3m 48s
 9 915 tests ±0   9 844 ✅ ±0  71 💤 ±0  0 ❌ ±0 
10 388 runs  ±0  10 308 ✅ ±0  80 💤 ±0  0 ❌ ±0 

Results for commit 25d6737. ± Comparison against base commit 04759ce.

♻️ This comment has been updated with latest results.

Rolldown does not guarantee ESM-spec module execution order by default,
which causes null reference errors ('_root') when Vaadin/Polymer
components are initialized out of order. This is triggered when
top-level await is present in the module graph.

Enable output.strictExecutionOrder to inject runtime helpers that
preserve correct initialization order at a slight bundle size cost.
@github-actions github-actions bot added +1.0.0 and removed +0.0.1 labels Mar 16, 2026
Artur- added 2 commits March 17, 2026 08:55
Use separate @rolldown/plugin-babel for Babel transforms since
@vitejs/plugin-react v6 removed the babel option. Trim media query
in theme-util.js to avoid leading space in link elements. Accept
both quote styles in PWA service worker importScripts assertion
since Rolldown preserves single quotes unlike esbuild.
@github-actions github-actions bot added +0.0.1 and removed +1.0.0 labels Mar 17, 2026
Artur- added 4 commits March 17, 2026 12:26
Add @babel/core and @rolldown/plugin-babel to expected dev
dependencies list in NodeUpdaterTest.
In v6, babel presets and plugins are top-level options instead of
nested under a 'babel' key. Removes unnecessary @rolldown/plugin-babel
dependency. Adds debug output to PwaTestIT to diagnose SW content.
Revert reactPlugin() back to original babel: nested format — the
v6 top-level babel options caused production build failures. The
babel option being silently ignored doesn't break existing tests.

Fix SW importScripts by using self.importScripts() so Rolldown
preserves it in IIFE bundles instead of dropping the bare global
call. Remove debug output from PwaTestIT.
@github-actions github-actions bot added +1.0.0 and removed +0.0.1 labels Mar 18, 2026
Artur- added 2 commits March 18, 2026 07:21
@vitejs/plugin-react v6 uses OXC instead of Babel for JSX. Use
jsxImportSource option for custom JSX runtime. Add @rolldown/plugin-babel
for only the non-JSX babel plugins (function source location and
signals transform) without @babel/preset-react to avoid double
JSX transformation.
@github-actions github-actions bot added +0.0.1 and removed +1.0.0 labels Mar 18, 2026
Rolldown uses backtick strings in its output, so checking for
specific quote styles doesn't work. Check for importScripts( and
the filename separately instead.
@Artur- Artur- marked this pull request as ready for review March 25, 2026 16:16
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant