Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/plugin-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

### `react` and `react-dom` is no longer added to [`resolve.dedupe`](https://vite.dev/config/#resolve-dedupe) automatically

Adding values to `resolve.dedupe` forces Vite to resolve them differently from how Node.js does, which can be confusing and may not be expected. This plugin no longer adds `react` and `react-dom` to `resolve.dedupe` automatically.

If you encounter errors after upgrading, check your package.json for version mismatches in `dependencies` or `devDependencies`, as well as your package manager’s configuration. If you prefer the previous behavior, you can manually add `react` and `react-dom` to `resolve.dedupe`.

## 4.7.0 (2025-07-18)

### Add HMR support for compound components ([#518](https://github.com/vitejs/vite-plugin-react/pull/518))
Expand Down
3 changes: 0 additions & 3 deletions packages/plugin-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,6 @@ export default function viteReact(opts: Options = {}): Plugin[] {
optimizeDeps: {
include: dependencies,
},
resolve: {
dedupe: ['react', 'react-dom'],
},
}),
resolveId: {
filter: { id: exactRegex(runtimePublicPath) },
Expand Down
Loading