File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,8 +23,4 @@ environment.plugins.append(
2323 } ) ,
2424) ;
2525
26- if ( devBuild && isHMR && config . assets_bundler !== 'rspack' ) {
27- // Rspack is the only supported bundler for this repo; no webpack refresh plugin wiring.
28- }
29-
3026module . exports = environment ;
Original file line number Diff line number Diff line change 44process . env . NODE_ENV = process . env . NODE_ENV || 'development' ;
55
66const { inliningCss } = require ( 'shakapacker' ) ;
7+ const ReactRefreshRspackPlugin = require ( '@rspack/plugin-react-refresh' ) ;
78
89const webpackConfig = require ( './webpackConfig' ) ;
910
10- const developmentEnvOnly = ( _clientWebpackConfig , _serverWebpackConfig ) => {
11+ const developmentEnvOnly = ( clientWebpackConfig , _serverWebpackConfig ) => {
1112 if ( inliningCss ) {
12- // Rspack HMR/refresh is handled by Shakapacker + @rspack/plugin-react-refresh.
13- // No extra development-only plugin wiring is needed here.
13+ clientWebpackConfig . plugins . push ( new ReactRefreshRspackPlugin ( ) ) ;
1414 }
1515} ;
1616
You can’t perform that action at this time.
0 commit comments