Commit 7a23d8c
Fix React Refresh to only enable with webpack-dev-server
- Change refresh condition from NODE_ENV === 'development' to WEBPACK_SERVE
- This ensures Fast Refresh only activates when using webpack-dev-server (bin/dev)
- Avoids unnecessary Fast Refresh transformation for static builds (bin/shakapacker)
- Matches the behavior of ReactRefreshWebpackPlugin in development.js
The WEBPACK_SERVE environment variable is set by webpack-dev-server and is the
correct indicator for when HMR and Fast Refresh should be active.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 603f0e5 commit 7a23d8c
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
0 commit comments