diff --git a/package.json b/package.json index 91cb892..6d52d3c 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,8 @@ }, "dependencies": { "@tyler/duckhawk": "npm:@jsr/tyler__duckhawk@^0.3.2", + "@vitejs/plugin-react": "4.3.4", + "babel-plugin-react-compiler": "19.0.0-beta-40c6c23-20250301", "react": "19.0.0", "react-dom": "19.0.0", "react-server-dom-webpack": "19.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e6c6fb7..0126201 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,12 @@ importers: '@tyler/duckhawk': specifier: npm:@jsr/tyler__duckhawk@^0.3.2 version: '@jsr/tyler__duckhawk@0.3.2' + '@vitejs/plugin-react': + specifier: 4.3.4 + version: 4.3.4(vite@6.2.0(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.39.0)) + babel-plugin-react-compiler: + specifier: 19.0.0-beta-40c6c23-20250301 + version: 19.0.0-beta-40c6c23-20250301 react: specifier: 19.0.0 version: 19.0.0 @@ -695,6 +701,9 @@ packages: ajv@8.17.1: resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} + babel-plugin-react-compiler@19.0.0-beta-40c6c23-20250301: + resolution: {integrity: sha512-himtjPafvMbA7PYnV2L+jprpB3h4rhx/n5s4L3gC654FOUsmsv5n4p8d6ufvK2zqUQs4kTOjgT2b4wnuDU32CA==} + browserslist@4.24.4: resolution: {integrity: sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -1710,6 +1719,10 @@ snapshots: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 + babel-plugin-react-compiler@19.0.0-beta-40c6c23-20250301: + dependencies: + '@babel/types': 7.26.9 + browserslist@4.24.4: dependencies: caniuse-lite: 1.0.30001702 diff --git a/waku.config.ts b/waku.config.ts new file mode 100644 index 0000000..180c69d --- /dev/null +++ b/waku.config.ts @@ -0,0 +1,19 @@ +import { defineConfig } from "waku/config"; +import react from "@vitejs/plugin-react"; + +const getConfig = () => ({ + plugins: [ + react({ + babel: { + plugins: [["babel-plugin-react-compiler", {}]], + }, + }), + ], +}); + +export default defineConfig({ + unstable_viteConfigs: { + "dev-main": getConfig, + "build-client": getConfig, + }, +});