-
-
Notifications
You must be signed in to change notification settings - Fork 203
Open
Open
Copy link
Labels
Description
Related plugins
Describe the bug
In a microfrontend architecture, Hot Module Replacement (HMR) and React Fast Refresh stop working when the microfrontends use react-swc (or any SWC-based React transform such as @vitejs/plugin-react-swc, @swc/loader, or SWC inside a custom build setup). The same architecture works correctly with Babel-based React Refresh.
Reproduction
https://github.com/vitejs/vite-plugin-react/
Steps to reproduce
No response
System Info
System:
OS: macOS 26.1
CPU: (8) arm64 Apple M3
Memory: 68.77 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.11.0 - /usr/local/bin/node
npm: 11.6.1 - /usr/local/bin/npm
Browsers:
Chrome: 142.0.7444.176
Safari: 26.1
npmPackages:
@vitejs/plugin-react-swc: ^4.2.1 => 4.2.2
vite: ^7.2.2 => 7.2.2Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.