diff --git a/src/webpack.config.js b/src/webpack.config.js index 9760ff05..d0639374 100644 --- a/src/webpack.config.js +++ b/src/webpack.config.js @@ -367,7 +367,12 @@ function plugins() { } // Ignore all locale files of moment.js - plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)); + plugins.push( + new webpack.IgnorePlugin({ + resourceRegExp: /^\.\/locale$/, + contextRegExp: /moment$/, + }) + ); // Ignore any packages specified in the `ignorePackages` option for (let i = 0, l = ignorePackages.length; i < l; i++) {