From b34d03eab45c5680061c1602a7f705ab186794f2 Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Tue, 25 Jan 2022 15:14:00 +0100 Subject: [PATCH] Fix usage of IgnorePlugin The constructor of IgnorePlugin has changed since webpack v5. Ref https://webpack.js.org/plugins/ignore-plugin/#example-of-ignoring-moment-locales Signed-off-by: Richard Steinmetz --- webpack.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index bb046c5e..5574a804 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -5,7 +5,10 @@ const webpackConfig = require('@nextcloud/webpack-vue-config') webpackConfig.entry['files-action'] = path.join(__dirname, 'src', 'files-action.js') webpackConfig.entry['admin-settings'] = path.join(__dirname, 'src', 'admin-settings.js') webpackConfig.plugins.push(...[ - new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), + new webpack.IgnorePlugin({ + resourceRegExp: /^\.\/locale$/, + contextRegExp: /moment$/, + }), ]) webpackConfig.module.rules.push({