diff --git a/webpack.config.js b/webpack.config.js index fdc42aa..6f34301 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -114,6 +114,15 @@ module.exports = { // Make appName & appVersion available as a constant new webpack.DefinePlugin({ appName: JSON.stringify(appName) }), new webpack.DefinePlugin({ appVersion: JSON.stringify(appVersion) }), + + // @nextcloud/moment since v1.3.0 uses `moment/min/moment-with-locales.js` + // Which works only in Node.js and is not compatible with Webpack bundling + // It has an unused function `localLocale` that requires locales by invalid relative path `./locale` + // Though it is not used, Webpack tries to resolve it with `require.context` and fails + new webpack.IgnorePlugin({ + resourceRegExp: /^\.\/locale$/, + contextRegExp: /moment\/min$/, + }), ], resolve: {