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>
This commit is contained in:
Richard Steinmetz 2022-01-25 15:14:00 +01:00
parent 242d640363
commit b34d03eab4
No known key found for this signature in database
GPG Key ID: 27137D9E7D273FB2
1 changed files with 4 additions and 1 deletions

View File

@ -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({