Skip to content

chore(frontend): upgrade Vite to 8#1065

Merged
alainncls merged 2 commits intodevfrom
codex/deps-vite-8
Apr 24, 2026
Merged

chore(frontend): upgrade Vite to 8#1065
alainncls merged 2 commits intodevfrom
codex/deps-vite-8

Conversation

@alainncls
Copy link
Copy Markdown
Collaborator

@alainncls alainncls commented Apr 24, 2026

Summary

  • Upgrade the explorer and tutorial Vite toolchains to Vite 8.0.10.
  • Upgrade the React Vite plugin to v6 and vite-plugin-svgr to v5 where used.
  • Remove vite-tsconfig-paths from the explorer config and use Vite 8 native resolve.tsconfigPaths instead.
  • Add an explicit tutorial web3 chunk for the wallet stack so Rolldown does not split viem into a runtime cycle.

Impact

  • Explorer and tutorial stay on Vite 8.
  • The tutorial preview previously rendered a black screen because the production bundle split viem across a circular index <-> _esm chunk relationship, leaving BaseError undefined at module evaluation time.
  • vite-plugin-radar remains on 0.10.1 because it is the latest available release. It builds with Vite 8, but its peer dependency range only declares Vite up to 7, so reviewers should keep that compatibility risk in mind.

Validation

  • pnpm --filter verax-explorer run build
  • pnpm --filter @verax-attestation-registry/verax-tutorial run build
  • pnpm --filter verax-explorer run lint
  • pnpm --filter @verax-attestation-registry/verax-tutorial run lint
  • Headless Chrome against local vite preview: no Uncaught/TypeError/ReferenceError/SyntaxError, and the page renders Connect your wallet.
  • Pre-commit hook: Prettier, full lint, Forge tests (199 tests passed). Solhint emitted existing import-path warnings only; no errors.

Refs #1056

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 24, 2026

Deploy Preview for verax-tutorial ready!

Name Link
🔨 Latest commit 48ac290
🔍 Latest deploy log https://app.netlify.com/projects/verax-tutorial/deploys/69eb7c06d506d10008cb3520
😎 Deploy Preview https://deploy-preview-1065--verax-tutorial.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

@github-actions github-actions Bot temporarily deployed to pull request April 24, 2026 11:04 Inactive
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.41%. Comparing base (fde2018) to head (48ac290).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1065   +/-   ##
=======================================
  Coverage   51.41%   51.41%           
=======================================
  Files          26       26           
  Lines         776      776           
  Branches      111      106    -5     
=======================================
  Hits          399      399           
  Misses        377      377           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 24, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​vite@​7.3.2 ⏵ 8.0.1099 +31008299100
Updatednpm/​vite-plugin-svgr@​4.5.0 ⏵ 5.2.010010096 +289100
Updatednpm/​@​vitejs/​plugin-react@​5.2.0 ⏵ 6.0.1100 +110010094100

View full report

@alainncls alainncls marked this pull request as ready for review April 24, 2026 12:44
@alainncls alainncls self-assigned this Apr 24, 2026
@alainncls alainncls changed the title [codex] Migrate explorer and tutorial to Vite 8 chore(explorer): upgrade Vite to 8 Apr 24, 2026
@alainncls alainncls changed the title chore(explorer): upgrade Vite to 8 chore(frontend): upgrade Vite to 8 Apr 24, 2026
@alainncls
Copy link
Copy Markdown
Collaborator Author

J'ai reproduit la preview noire sur le deploy Netlify : le bundle production lançait Uncaught TypeError: Class extends value undefined is not a constructor or null dans le chunk _esm-*.js généré à partir de viem/_esm.

Cause : avec Vite 8/Rolldown, le tutorial découpait la stack wallet/web3 en chunks circulaires. Le chunk viem importait BaseError depuis le chunk principal, pendant que le chunk principal importait déjà viem, donc BaseError était encore undefined à l'évaluation.

Fix poussé en 48ac290 : tutorial/vite.config.ts force seulement les packages web3/wallet (viem, wagmi, @reown, WalletConnect, etc.) dans un chunk web3, ce qui garde Vite 8 et évite le cycle runtime sans revenir à Vite 7.

Validé localement : build tutorial, lint tutorial, Prettier ciblé, git diff --check, pre-commit complet (dont Forge : 199 tests passés), et headless Chrome sur vite preview sans Uncaught/TypeError avec la page rendue (Connect your wallet).

@alainncls alainncls merged commit 8920036 into dev Apr 24, 2026
28 checks passed
@alainncls alainncls deleted the codex/deps-vite-8 branch April 24, 2026 15:51
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.

3 participants