Browse Source

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.
master
Werner Fleischer 2 years ago
parent
commit
a0aff63dde
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      webpack.config.js

+ 4
- 0
webpack.config.js View File

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

Loading…
Cancel
Save