Skip to content

Commit

Permalink
fix(webpack): ignore optional canvas dependency in resemblejs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wfleischer authored and saghul committed Oct 18, 2021
1 parent f24e0f3 commit a0aff63
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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$/
Expand Down

0 comments on commit a0aff63

Please sign in to comment.