From 2e5e146f0c763cf0f815e8692b77cfaae0b88a89 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Fri, 17 Sep 2021 21:59:17 +0800 Subject: [PATCH] chore: update ignorePlugin --- webpack.build.conf.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webpack.build.conf.js b/webpack.build.conf.js index 1da4ffd91..821494643 100644 --- a/webpack.build.conf.js +++ b/webpack.build.conf.js @@ -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) {