Skip to content

Commit 9c9e5b3

Browse files
committed
Update IgnorePlugin argument signature in webpack config
1 parent 038f9ed commit 9c9e5b3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/react-scripts/config/webpack.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,10 @@ module.exports = function(webpackEnv) {
674674
// solution that requires the user to opt into importing specific locales.
675675
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
676676
// You can remove this if you don't use Moment.js:
677-
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
677+
new webpack.IgnorePlugin({
678+
resourceRegExp: /^\.\/locale$/,
679+
contextRegExp: /moment$/,
680+
}),
678681
// Generate a service worker script that will precache, and keep up to date,
679682
// the HTML & assets that are part of the Webpack build.
680683
isEnvProduction &&

0 commit comments

Comments
 (0)