diff --git a/packages/plugin-rsc/e2e/react-compiler.test.ts b/packages/plugin-rsc/e2e/react-compiler.test.ts index 2c36e24b5..6328f4418 100644 --- a/packages/plugin-rsc/e2e/react-compiler.test.ts +++ b/packages/plugin-rsc/e2e/react-compiler.test.ts @@ -3,6 +3,17 @@ import { setupInlineFixture, useFixture } from './fixture' import { defineStarterTest } from './starter' import { waitForHydration } from './helper' +// perEnvironmentPlugin("react-compiler", (e) => { +// if (e.name === 'client') { +// return babel({ +// filter: /\.[jt]sx?$/, +// babelConfig: { +// plugins: ['babel-plugin-react-compiler'] +// } +// }) +// } +// }), + test.describe(() => { const root = 'examples/e2e/temp/react-compiler' diff --git a/packages/plugin-rsc/examples/e2e/package.json b/packages/plugin-rsc/examples/e2e/package.json index 0ef6d6d95..be7f1edb0 100644 --- a/packages/plugin-rsc/examples/e2e/package.json +++ b/packages/plugin-rsc/examples/e2e/package.json @@ -5,6 +5,7 @@ "devDependencies": { "@vitejs/plugin-react": "latest", "@vitejs/plugin-rsc": "latest", - "babel-plugin-react-compiler": "19.1.0-rc.2" + "babel-plugin-react-compiler": "19.1.0-rc.2", + "vite-plugin-babel": "^1.3.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 41c8fd089..320f07813 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -603,6 +603,9 @@ importers: babel-plugin-react-compiler: specifier: 19.1.0-rc.2 version: 19.1.0-rc.2 + vite-plugin-babel: + specifier: ^1.3.2 + version: 1.3.2(@babel/core@7.28.0)(vite@7.1.1(@types/node@22.17.1)(jiti@2.4.2)(lightningcss@1.30.1)(tsx@4.20.3)(yaml@2.7.1)) packages/plugin-rsc/examples/no-ssr: dependencies: @@ -4813,6 +4816,12 @@ packages: engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true + vite-plugin-babel@1.3.2: + resolution: {integrity: sha512-mEld4OVyuNs5+ISN+U5XyTnNcDwln/s2oER2m0PQ32YYPqPR25E3mfnhAA/RkZJxPuwFkprKWV405aZArE6kzA==} + peerDependencies: + '@babel/core': ^7.0.0 + vite: ^2.7.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 + vite-plugin-inspect@11.3.2: resolution: {integrity: sha512-nzwvyFQg58XSMAmKVLr2uekAxNYvAbz1lyPmCAFVIBncCgN9S/HPM+2UM9Q9cvc4JEbC5ZBgwLAdaE2onmQuKg==} engines: {node: '>=14'} @@ -8954,6 +8963,11 @@ snapshots: - tsx - yaml + vite-plugin-babel@1.3.2(@babel/core@7.28.0)(vite@7.1.1(@types/node@22.17.1)(jiti@2.4.2)(lightningcss@1.30.1)(tsx@4.20.3)(yaml@2.7.1)): + dependencies: + '@babel/core': 7.28.0 + vite: 7.1.1(@types/node@22.17.1)(jiti@2.4.2)(lightningcss@1.30.1)(tsx@4.20.3)(yaml@2.7.1) + vite-plugin-inspect@11.3.2(vite@7.1.1(@types/node@22.17.1)(jiti@2.4.2)(lightningcss@1.30.1)(tsx@4.20.3)(yaml@2.7.1)): dependencies: ansis: 4.1.0