Skip to content

Commit 07cd36d

Browse files
authored
Merge pull request #384 from code0-tech/202-react-compiler-setup
Setup react compiler
2 parents ce6ab27 + d153ad2 commit 07cd36d

File tree

3 files changed

+123
-58
lines changed

3 files changed

+123
-58
lines changed

package-lock.json

Lines changed: 110 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
"author": "Code0",
2020
"devDependencies": {
2121
"@ariakit/react": "^0.4.17",
22+
"@babel/plugin-proposal-decorators": "^7.28.0",
23+
"@babel/plugin-transform-class-properties": "^7.27.1",
2224
"@mdx-js/react": "^3.1.0",
2325
"@radix-ui/react-checkbox": "^1.3.2",
2426
"@radix-ui/react-dropdown-menu": "^2.1.15",
@@ -51,6 +53,7 @@
5153
"@vitejs/plugin-react": "^4.6.0",
5254
"axe-playwright": "^2.1.0",
5355
"babel-loader": "^9.2.1",
56+
"babel-plugin-react-compiler": "^19.1.0-rc.2",
5457
"concurrently": "^9.1.2",
5558
"css-loader": "^7.1.2",
5659
"html-webpack-plugin": "^5.6.3",
@@ -85,9 +88,9 @@
8588
"@radix-ui/react-checkbox": "^1.3.2",
8689
"@radix-ui/react-dropdown-menu": "^2.1.15",
8790
"@radix-ui/react-one-time-password-field": "^0.1.7",
91+
"@radix-ui/react-radio-group": "^1.3.7",
8892
"@radix-ui/react-tabs": "^1.1.12",
8993
"@radix-ui/react-toggle-group": "^1.1.10",
90-
"@radix-ui/react-radio-group": "^1.3.7",
9194
"@tabler/icons-react": "^3.5.0",
9295
"js-md5": "^0.8.3",
9396
"merge-props": "^6.0.0",

vite.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@ import pkg from './package.json'
99

1010
export default defineConfig({
1111
plugins: [
12-
react(),
12+
react({
13+
babel: {
14+
plugins: [
15+
'babel-plugin-react-compiler',
16+
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
17+
'@babel/plugin-transform-class-properties'
18+
],
19+
},
20+
}),
1321
libInjectCss(),
1422
dts({
1523
include: ['src'],

0 commit comments

Comments
 (0)