improve performance by enabling the react compiler (#1087)

This commit is contained in:
Athou
2025-05-26 21:06:53 +02:00
parent c7cec464aa
commit 4918b69d0a
3 changed files with 13 additions and 1 deletions

View File

@@ -61,6 +61,7 @@
"@types/tinycon": "^0.6.7",
"@vitejs/plugin-react": "^4.5.0",
"babel-plugin-macros": "^3.1.0",
"babel-plugin-react-compiler": "^19.1.0-rc.2",
"jsdom": "^26.1.0",
"rollup-plugin-visualizer": "^6.0.0",
"typescript": "^5.8.3",
@@ -2824,6 +2825,16 @@
"node": ">= 6"
}
},
"node_modules/babel-plugin-react-compiler": {
"version": "19.1.0-rc.2",
"resolved": "https://registry.npmjs.org/babel-plugin-react-compiler/-/babel-plugin-react-compiler-19.1.0-rc.2.tgz",
"integrity": "sha512-kSNA//p5fMO6ypG8EkEVPIqAjwIXm5tMjfD1XRPL/sRjYSbJ6UsvORfaeolNWnZ9n310aM0xJP7peW26BuCVzA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/types": "^7.26.0"
}
},
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",

View File

@@ -68,6 +68,7 @@
"@types/tinycon": "^0.6.7",
"@vitejs/plugin-react": "^4.5.0",
"babel-plugin-macros": "^3.1.0",
"babel-plugin-react-compiler": "^19.1.0-rc.2",
"jsdom": "^26.1.0",
"rollup-plugin-visualizer": "^6.0.0",
"typescript": "^5.8.3",

View File

@@ -10,7 +10,7 @@ export default defineConfig(() => ({
plugins: [
react({
babel: {
plugins: ["@lingui/babel-plugin-lingui-macro"],
plugins: [["babel-plugin-react-compiler", { target: "19" }], "@lingui/babel-plugin-lingui-macro"],
},
}),
lingui(),