diff --git a/packages/plugin-react/CHANGELOG.md b/packages/plugin-react/CHANGELOG.md index d004d75d3..a582cea08 100644 --- a/packages/plugin-react/CHANGELOG.md +++ b/packages/plugin-react/CHANGELOG.md @@ -8,6 +8,8 @@ When used with rolldown-vite, this plugin now uses Oxc for react refresh transfo Since this behavior is what `@vitejs/plugin-react-oxc` did, `@vitejs/plugin-react-oxc` is now deprecated and the `disableOxcRecommendation` option is removed. +Also, while `@vitejs/plugin-react-oxc` used the production JSX transform even for `NODE_ENV=development` build, `@vitejs/plugin-react` uses the development JSX transform for `NODE_ENV=development` build. + ### Allow processing files in `node_modules` The default value of `exclude` options is now `[/\/node_modules\//]` to allow processing files in `node_modules` directory. It was previously `[]` and files in `node_modules` was always excluded regardless of the value of `exclude` option. diff --git a/packages/plugin-react/src/index.ts b/packages/plugin-react/src/index.ts index 648da2cf8..7ee6535ea 100644 --- a/packages/plugin-react/src/index.ts +++ b/packages/plugin-react/src/index.ts @@ -155,7 +155,6 @@ export default function viteReact(opts: Options = {}): Plugin[] { runtime: 'automatic', importSource: jsxImportSource, refresh: command === 'serve', - development: command === 'serve', }, jsxRefreshInclude: include, jsxRefreshExclude: exclude, diff --git a/packages/plugin-rsc/e2e/starter.test.ts b/packages/plugin-rsc/e2e/starter.test.ts index 2d49059a3..a66db75cf 100644 --- a/packages/plugin-rsc/e2e/starter.test.ts +++ b/packages/plugin-rsc/e2e/starter.test.ts @@ -2,7 +2,6 @@ import { expect, test } from '@playwright/test' import { useFixture } from './fixture' import { defineStarterTest } from './starter' import { waitForHydration } from './helper' -import * as vite from 'vite' test.describe('dev-default', () => { const f = useFixture({ root: 'examples/starter', mode: 'dev' }) @@ -25,8 +24,6 @@ test.describe('build-cloudflare', () => { }) test.describe('dev-production', () => { - test.skip('rolldownVersion' in vite) - const f = useFixture({ root: 'examples/starter', mode: 'dev', @@ -45,8 +42,6 @@ test.describe('dev-production', () => { }) test.describe('build-development', () => { - test.skip('rolldownVersion' in vite) - const f = useFixture({ root: 'examples/starter', mode: 'build', diff --git a/playground/tsconfig.json b/playground/tsconfig.json index d6e393de0..e7d00756b 100644 --- a/playground/tsconfig.json +++ b/playground/tsconfig.json @@ -1,5 +1,5 @@ { - "include": ["*.ts", "**/__tests__/*.ts", "**/vite.config.ts"], + "include": ["*.ts", "**/__tests__/**/*", "**/vite.config.ts"], "exclude": ["**/dist/**"], "compilerOptions": { "target": "ES2023",