Skip to content

Commit

Permalink
enable compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
MrWangJustToDo committed Nov 14, 2024
1 parent beee5db commit a1bb1e6
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 3 deletions.
64 changes: 63 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions scripts/rollupBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const buildPackages = async () => {
};

const start = async () => {
await buildPackages();
await rollupBuild({ packageName: "graphql", packageScope: "site", external });
// await buildPackages();
// await rollupBuild({ packageName: "graphql", packageScope: "site", external });
await rollupBuild({ packageName: "webpack", packageScope: "site", external });
process.exit(0);
};
Expand Down
6 changes: 6 additions & 0 deletions ui/ssr-example/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ module.exports = {
browser: true,
es2021: true,
},
plugins: [
'eslint-plugin-react-compiler',
],
rules: {
'react-compiler/react-compiler': 'error',
},
parserOptions: {
ecmaFeatures: {
jsx: true,
Expand Down
1 change: 1 addition & 0 deletions ui/ssr-example/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module.exports = (api) => {
plugins.push(["@babel/plugin-proposal-private-methods", { loose: true }]);
plugins.push(["@babel/plugin-proposal-private-property-in-object", { loose: true }]);
plugins.push("@babel/plugin-transform-runtime");
plugins.push(["babel-plugin-react-compiler", { target: "18" }]);
plugins.push("@babel/plugin-proposal-export-default-from");
process.env.STREAM === "false" && plugins.push("@loadable/babel-plugin");

Expand Down
3 changes: 3 additions & 0 deletions ui/ssr-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,15 @@
"@types/react-grid-layout": "^1.3.5",
"@types/react-resizable": "^3.0.8",
"@types/webpack-env": "^1.18.5",
"babel-plugin-react-compiler": "19.0.0-beta-a7bf2bd-20241110",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint-plugin-react-compiler": "19.0.0-beta-a7bf2bd-20241110",
"identity-obj-proxy": "^3.0.0",
"lodash": "^4.17.21",
"module-alias": "^2.2.3",
"prettier": "^3.3.3",
"react-compiler-runtime": "19.0.0-beta-a7bf2bd-20241110",
"react-refresh": "^0.14.2",
"typescript": "^5.3.3",
"webpack": "^5.95.0"
Expand Down

0 comments on commit a1bb1e6

Please sign in to comment.