fix(webpack): ignore optional canvas dependency in resemblejs

Skipping node-canvas dependency in resemblejs as it [fails in certain environments](https://github.com/rsmbl/Resemble.js#nodejs).
The reference states

> If you are using Resemble.js for in-browser analysis only, you can skip the node-canvas dependency.
This commit is contained in:
Werner Fleischer 2021-10-18 16:17:14 +02:00 committed by Saúl Ibarra Corretgé
parent f24e0f3622
commit a0aff63dde
1 changed files with 4 additions and 0 deletions

View File

@ -294,6 +294,10 @@ module.exports = (_env, argv) => {
plugins: [
...config.plugins,
...getBundleAnalyzerPlugin(analyzeBundle, 'app'),
new webpack.IgnorePlugin({
resourceRegExp: /^canvas$/,
contextRegExp: /resemblejs$/
}),
new webpack.IgnorePlugin({
resourceRegExp: /^\.\/locale$/,
contextRegExp: /moment$/