summaryrefslogtreecommitdiffstats
path: root/webpack.config.js
diff options
context:
space:
mode:
authorRichard Steinmetz <richard@steinmetz.cloud>2022-01-25 15:14:00 +0100
committerRichard Steinmetz <richard@steinmetz.cloud>2022-01-25 15:14:00 +0100
commitb34d03eab45c5680061c1602a7f705ab186794f2 (patch)
treefe84593e33069e22ce5172a6b0d0a0b952aea739 /webpack.config.js
parent242d640363dfebcbe4e2e6c87c3806bb40076068 (diff)
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 <richard@steinmetz.cloud>
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js5
1 files changed, 4 insertions, 1 deletions
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({