Skip to content

Commit

Permalink
Scripts: Fix misplaced ReactRefreshWebpackPlugin (#57777)
Browse files Browse the repository at this point in the history
Restore ReactRefreshWebpackPlugin to @wordpress/scripts webpack config.

#57461 accidentally moved the plugin to the modules config. It should have remained in the scripts webpack config and not been included in the modules config.
  • Loading branch information
sirreal authored and gziolo committed Jan 16, 2024
1 parent 60adb37 commit 2671828
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,8 @@ const scriptConfig = {
process.env.WP_BUNDLE_ANALYZER && new BundleAnalyzerPlugin(),
// MiniCSSExtractPlugin to extract the CSS thats gets imported into JavaScript.
new MiniCSSExtractPlugin( { filename: '[name].css' } ),
// React Fast Refresh.
hasReactFastRefresh && new ReactRefreshWebpackPlugin(),
// WP_NO_EXTERNALS global variable controls whether scripts' assets get
// generated, and the default externals set.
! process.env.WP_NO_EXTERNALS &&
Expand Down Expand Up @@ -423,8 +425,6 @@ if ( hasExperimentalModulesFlag ) {
process.env.WP_BUNDLE_ANALYZER && new BundleAnalyzerPlugin(),
// MiniCSSExtractPlugin to extract the CSS thats gets imported into JavaScript.
new MiniCSSExtractPlugin( { filename: '[name].css' } ),
// React Fast Refresh.
hasReactFastRefresh && new ReactRefreshWebpackPlugin(),
// WP_NO_EXTERNALS global variable controls whether scripts' assets get
// generated, and the default externals set.
! process.env.WP_NO_EXTERNALS &&
Expand Down

0 comments on commit 2671828

Please sign in to comment.