Skip to content

Commit 33cda31

Browse files
devmgnclaude
andauthored
feat(test): enable React Compiler in vitest (#2711)
* feat(test): enable React Compiler in vitest Run `babel-plugin-react-compiler` through `@rolldown/plugin-babel` + `reactCompilerPreset` so the memoize behavior in unit tests matches production (Next.js). Keeps hooks and components free of manual `useCallback` / `useMemo` while still catching regressions in tests. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * fix: lock file --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
1 parent e87be62 commit 33cda31

3 files changed

Lines changed: 185 additions & 109 deletions

File tree

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@
4545
"zod": "4.3.6"
4646
},
4747
"devDependencies": {
48+
"@babel/core": "7.29.0",
4849
"@faker-js/faker": "10.4.0",
4950
"@next/env": "16.2.4",
51+
"@rolldown/plugin-babel": "0.2.3",
5052
"@storybook/addon-a11y": "10.3.5",
5153
"@storybook/addon-docs": "10.3.5",
5254
"@storybook/addon-mcp": "0.6.0",
@@ -57,6 +59,7 @@
5759
"@testing-library/jest-dom": "6.9.1",
5860
"@testing-library/react": "16.3.2",
5961
"@testing-library/user-event": "14.6.1",
62+
"@types/babel__core": "7.20.5",
6063
"@types/node": "24.12.2",
6164
"@types/react": "19.2.14",
6265
"@types/react-dom": "19.2.3",

0 commit comments

Comments
 (0)