chore: update ignorePlugin

pull/4671/head 2.2.8
tangjinzhou 2021-09-17 21:59:17 +08:00
parent 5d990afe27
commit 2e5e146f0c
1 changed files with 3 additions and 1 deletions

View File

@ -8,7 +8,9 @@ const { webpack } = getWebpackConfig;
// http://stackoverflow.com/q/25384360
function ignoreMomentLocale(webpackConfig) {
delete webpackConfig.module.noParse;
webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/));
webpackConfig.plugins.push(
new webpack.IgnorePlugin({ resourceRegExp: /^\.\/locale$/, contextRegExp: /moment$/ }),
);
}
function addLocales(webpackConfig) {