Upgrade Guide
Pure ESM package
@rspack/plugin-react-refresh is now pure ESM (the same as Rspack 2.0).
Default export removed
The plugin now provides a named export only.
- import ReactRefreshRspackPlugin from '@rspack/plugin-react-refresh';
+ import { ReactRefreshRspackPlugin } from '@rspack/plugin-react-refresh';overlay option removed
The overlay option has been removed. Rspack dev server and Rsbuild dev server already provide built-in error overlays, so this package no longer ships its own overlay integration.
Default option changes
The default extension filter has moved from include to test.
Before:
test:undefinedinclude:/\.([cm]js|[jt]sx?|flow)$/i
Now:
test:/\.(?:js|jsx|mjs|cjs|ts|tsx|mts|cts)$/include:undefined
This makes custom include safer: when include points to a directory, the plugin still only applies to supported JS/TS module extensions by default.
What's Changed
Breaking Changes
- feat!: remove overlay support by @chenjiahan in #89
- feat!: update default include regex by @chenjiahan in #99
- refactor!: remove CommonJS and default export entrypoints by @chenjiahan in #90
- fix!: preserve default extension filter when include is customized by @chenjiahan in #100
Others
- refactor: migrate package runtime to ESM by @chenjiahan in #91
- chore: replace Biome with rslint and Prettier by @chenjiahan in #92
- chore: remove unused release tooling deps by @chenjiahan in #93
- ci: simplify release workflow by @chenjiahan in #94
- fix: remove deprecated static method for runtime paths by @chenjiahan in #95
- feat: add optional peer dependency for @rspack/core by @chenjiahan in #96
- chore: update references from webpack to Rspack by @chenjiahan in #97
- refactor: modernize react refresh runtime helpers by @chenjiahan in #98
- release: 2.0.0-beta.0 by @chenjiahan in #101
Full Changelog: v1.6.2...v2.0.0-beta.0