Skip to content

fix: revert React compiler upgrade#5658

Merged
therealemjy merged 1 commit into
mainfrom
fix/revert-compiler
Jun 23, 2026
Merged

fix: revert React compiler upgrade#5658
therealemjy merged 1 commit into
mainfrom
fix/revert-compiler

Conversation

@therealemjy

Copy link
Copy Markdown
Member

Changes

  • revert React compiler upgrade to conduct further testing

@therealemjy therealemjy requested a review from cuzz-venus June 23, 2026 07:54
@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2248be0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dapp-preview Ready Ready Preview Jun 23, 2026 7:55am
dapp-testnet Ready Ready Preview Jun 23, 2026 7:55am
venus.io Ready Ready Preview Jun 23, 2026 7:55am

Request Review

@greptile-apps

greptile-apps Bot commented Jun 23, 2026

Copy link
Copy Markdown

Greptile Summary

This PR reverts the Vite v8 + React Compiler upgrade (#5639) to allow further testing, downgrading vite back to v6 and @vitejs/plugin-react back to v4 while removing all Babel/React Compiler related dependencies. Alongside the toolchain revert, the store export naming convention is restored to the pre-upgrade pattern (export const store with store.use.X() consumption) and all consumers are updated consistently.

  • Toolchain revert: removes babel-plugin-react-compiler, @rolldown/plugin-babel, @babel/core, and @types/babel__core; downgrades @vitejs/plugin-react to ^4.3.3 and vite to ^6.2.5.
  • Buffer polyfill: runtime globalThis.Buffer injection in index.tsx is dropped; @rollup/plugin-inject in vite.config.mts remains the build-time polyfill, matching the state before the upgrade.
  • Store API + icon: all zustand stores revert their public export from useStore back to store, with usage sites updated to store.use.X(); the swap icon is renamed back to switch.

Confidence Score: 5/5

Safe to merge — the change restores a known-good toolchain configuration and consistently updates all affected call sites.

Every changed file is either a mechanical dependency downgrade, a store rename applied uniformly across all consumers, or a test update mirroring the production change. The pre-upgrade Vite v6 + plugin-react v4 configuration was already proven stable, the Buffer polyfill path via @rollup/plugin-inject was already in place before the upgrade, and no new logic is introduced.

No files require special attention.

Important Files Changed

Filename Overview
apps/evm/vite.config.mts Reverts React compiler setup: removes babel/rolldown plugins, downgrades @vitejs/plugin-react to v4 and vite to v6; Buffer polyfill is now handled exclusively by @rollup/plugin-inject (matching the pre-upgrade state)
apps/evm/package.json Removes @babel/core, @rolldown/plugin-babel, @types/babel__core, babel-plugin-react-compiler; downgrades @vitejs/plugin-react to ^4.3.3 and vite to ^6.2.5; adds @rollup/plugin-inject
apps/evm/src/store/index.ts Internal variable renamed from store to useStore; public export renamed from useStore to store — reverting the naming introduced by the React compiler PR
apps/evm/src/index.tsx Removes runtime globalThis.Buffer polyfill (now handled at build time by @rollup/plugin-inject); import order adjustment; matches the pre-upgrade state
apps/evm/src/components/Icon/icons/switch.tsx New file adding the SVG switch icon — this is actually a rename back from swap.tsx (which was renamed to swap by the React compiler PR); usage in PairInfo updated accordingly
apps/evm/src/libs/notifications/utilities/index.ts All useStore.getState() calls updated to store.getState() to match the reverted store export name
apps/evm/src/hooks/useSendTransaction/tests/index.gaslessTransactions.spec.tsx Mock updated from useStore selector pattern to store.use.openModal() pattern, consistent with the reverted store API
apps/evm/src/hooks/useUserChainSettings/tests/index.spec.tsx Mock migrated from the useStore selector pattern to the store.use.* hook pattern; the UserChainSettings type import is dropped in favour of directly setting mock return values
yarn.lock Lock file updated to reflect vite v6, @vitejs/plugin-react v4, @rollup/plugin-inject addition, and removal of Babel-related React compiler packages

Reviews (1): Last reviewed commit: "Revert "chore: upgrade Vite to v8 and en..." | Re-trigger Greptile

@cuzz-venus cuzz-venus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report for ./apps/evm

Status Category Percentage Covered / Total
🔵 Lines 81.65% 47989 / 58767
🔵 Statements 81.65% 47989 / 58767
🔵 Functions 62.73% 670 / 1068
🔵 Branches 73.26% 5496 / 7502
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/evm/src/index.tsx 0% 0% 0% 0% 1-12
apps/evm/src/components/Icon/icons/index.ts 99% 0% 100% 99% 1
apps/evm/src/containers/Layout/index.tsx 0% 0% 0% 0% 1-92
apps/evm/src/containers/Layout/store.ts 0% 0% 0% 0% 1-19
apps/evm/src/containers/Layout/NavBar/Settings/GaslessTransactionSetting/index.tsx 0% 0% 0% 0% 1-46
apps/evm/src/containers/Layout/ScrollToTop/index.tsx 0% 0% 0% 0% 1-28
apps/evm/src/containers/ResendPayingGasModal/index.tsx 0% 0% 0% 0% 1-12
apps/evm/src/containers/ResendPayingGasModal/Modal/index.tsx 0% 0% 0% 0% 1-67
apps/evm/src/containers/ResendPayingGasModal/store/index.ts 75% 50% 0% 75% 1, 10
apps/evm/src/hooks/useSendTransaction/index.ts 90.56% 80% 50% 90.56% 5, 126-129, 161, 169, 195-197
apps/evm/src/hooks/useUserChainSettings/index.tsx 93.54% 33.33% 100% 93.54% 1, 26
apps/evm/src/libs/notifications/NotificationCenter/index.tsx 98.38% 57.14% 100% 98.38% 31
apps/evm/src/libs/notifications/store/index.ts 96.96% 92.85% 100% 96.96% 1
apps/evm/src/libs/notifications/utilities/index.ts 97.43% 83.33% 100% 97.43% 1
apps/evm/src/pages/Dashboard/Guide/index.tsx 79% 60% 0% 79% 47-48, 53-58, 90-104
apps/evm/src/pages/Dashboard/Overview/index.tsx 97.27% 74.5% 66.66% 97.27% 196, 227, 231, 262, 271-274
apps/evm/src/pages/Trade/index.tsx 94.4% 90% 66.66% 94.4% 65-73
apps/evm/src/pages/Trade/Banner/index.tsx 0% 0% 0% 0% 1-46
apps/evm/src/pages/Trade/Banner/store/index.ts 95.45% 80% 100% 95.45% 1
apps/evm/src/pages/Trade/ClosePositionModal/index.tsx 100% 50% 100% 100%
apps/evm/src/pages/Trade/ClosePositionModal/Form/index.tsx 0% 0% 0% 0% 1-22
apps/evm/src/pages/Trade/ClosePositionModal/store/index.ts 93.75% 83.33% 100% 93.75% 1
apps/evm/src/pages/Trade/PairInfo/index.tsx 95.9% 75% 100% 95.9% 148-149, 158-161, 194, 201
apps/evm/src/pages/Trade/Positions/PositionList/index.tsx 100% 92.85% 100% 100%
apps/evm/src/pages/Trade/ReduceForm/index.tsx 98.29% 96.29% 100% 98.29% 77, 322-325
apps/evm/src/store/index.ts 98.36% 90% 100% 98.36% 1
Generated in workflow #13701 for commit 2248be0 by the Vitest Coverage Report Action

@therealemjy therealemjy merged commit 2db077f into main Jun 23, 2026
5 checks passed
@therealemjy therealemjy deleted the fix/revert-compiler branch June 23, 2026 08:07
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.

2 participants