Skip to content

Commit bbafab5

Browse files
committed
perf: Add react compiler
1 parent 73c3a70 commit bbafab5

File tree

9 files changed

+70
-55
lines changed

9 files changed

+70
-55
lines changed

apps/docs/next.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ const withBundleAnalyzer = nextAnalyzer({
99
enabled: process.env.ANALYZE === "true",
1010
});
1111

12-
const nextConfig: NextConfig = {};
12+
const nextConfig: NextConfig = {
13+
reactCompiler: true,
14+
};
1315

1416
export default withBundleAnalyzer(withMDX(vitNodeNextConfig(nextConfig)));

apps/docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"@types/react": "^19.2.2",
5454
"@types/react-dom": "^19.2.2",
5555
"@vitnode/config": "workspace:*",
56+
"babel-plugin-react-compiler": "^1.0.0",
5657
"class-variance-authority": "^0.7.1",
5758
"eslint": "^9.39.1",
5859
"postcss": "^8.5.6",

apps/docs/src/app/layout.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import "./global.css";
22

3-
export const experimental_ppr = true;
4-
53
export default async function RootLayout({
64
children,
75
}: {

packages/create-vitnode-app/copy-of-vitnode-app/root/next.config.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ import { vitNodeNextConfig } from "@vitnode/core/config/next.config";
22
import type { NextConfig } from "next";
33

44
const nextConfig: NextConfig = {
5-
experimental: {
6-
inlineCss: true,
7-
ppr: "incremental",
8-
},
5+
reactCompiler: true,
96
};
107

118
export default vitNodeNextConfig(nextConfig);

packages/create-vitnode-app/src/create/create-package-json.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ const versions = {
6565
zod: "^4.1.12",
6666

6767
cva: "^0.7.1",
68+
babelPluginReactCompiler: "^1.0.0",
6869
};
6970

7071
/**
@@ -225,6 +226,7 @@ const singleAppDevDeps = (eslint: boolean) => ({
225226
"@types/react": versions.typesReact,
226227
"@types/react-dom": versions.typesReactDom,
227228
"@vitnode/config": "",
229+
"babel-plugin-react-compiler": versions.babelPluginReactCompiler,
228230
...withIf(eslint, {
229231
eslint: versions.eslint,
230232
prettier: versions.prettier,
@@ -255,6 +257,7 @@ const webDevDeps = (eslint: boolean) => ({
255257
"@types/react": versions.typesReact,
256258
"@types/react-dom": versions.typesReactDom,
257259
"@vitnode/config": "",
260+
"babel-plugin-react-compiler": versions.babelPluginReactCompiler,
258261
"class-variance-authority": versions.cva,
259262
...withIf(eslint, { eslint: versions.eslint }),
260263
postcss: versions.postcss,

packages/vitnode/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
],
2121
"peerDependencies": {
2222
"@hono/zod-openapi": "^1.0.x",
23-
"@swc/cli": "0.6.x",
24-
"@swc/core": "1.12.x",
23+
"@swc/cli": "0.7.x",
24+
"@swc/core": "1.x.x",
2525
"@types/react": "^19.1.x",
2626
"@types/react-dom": "^19.1.x",
2727
"drizzle-kit": "^0.31.x",
@@ -41,8 +41,8 @@
4141
"@hono/zod-validator": "^0.7.4",
4242
"@hookform/resolvers": "^5.2.2",
4343
"@react-email/components": "^1.0.0",
44-
"@swc/cli": "0.6.0",
45-
"@swc/core": "^1.13.5",
44+
"@swc/cli": "^0.7.9",
45+
"@swc/core": "^1.15.1",
4646
"@testing-library/dom": "^10.4.1",
4747
"@testing-library/react": "^16.3.0",
4848
"@types/node": "^24.10.0",

plugins/blog/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
},
5353
"devDependencies": {
5454
"@react-email/components": "^1.0.0",
55-
"@swc/cli": "0.6.0",
55+
"@swc/cli": "^0.7.9",
5656
"@swc/core": "^1.15.1",
5757
"@types/react": "^19.2.2",
5858
"@types/react-dom": "^19.2.2",

pnpm-lock.yaml

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

pnpm-workspace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ packages:
55

66
ignoredBuiltDependencies:
77
- '@swc/core'
8+
- esbuild
89
- sharp

0 commit comments

Comments
 (0)