File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/plugin-react/src Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -269,10 +269,12 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
269
269
} ,
270
270
}
271
271
272
- // We can't add `react-dom` because the dependency is `react-dom/client`
273
- // for React 18 while it's `react-dom` for React 17. We'd need to detect
274
- // what React version the user has installed.
275
- const dependencies = [ 'react' , jsxImportDevRuntime , jsxImportRuntime ]
272
+ const dependencies = [
273
+ 'react' ,
274
+ 'react-dom' ,
275
+ jsxImportDevRuntime ,
276
+ jsxImportRuntime ,
277
+ ]
276
278
const staticBabelPlugins =
277
279
typeof opts . babel === 'object' ? opts . babel ?. plugins ?? [ ] : [ ]
278
280
const reactCompilerPlugin = getReactCompilerPlugin ( staticBabelPlugins )
You can’t perform that action at this time.
0 commit comments