Bläddra i källkod

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 3 år sedan
förälder
incheckning
a0aff63dde
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4
    0
      webpack.config.js

+ 4
- 0
webpack.config.js Visa fil

@@ -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$/

Laddar…
Avbryt
Spara