Open mleduque opened 8 years ago
I'm trying to use imagediff with webpack (actually, karma-webpack). During "compilation", I get
ERROR in ./~/imagediff/imagediff.js Module not found: Error: Cannot resolve module 'fs' in [...]/node_modules/imagediff @ ./~/imagediff/imagediff.js 336:4-17
Then the tests are launched and I see
Uncaught TypeError: Cannot read property 'imagediff' of undefined at [...]/karma/tests/visualfill.js:69949 <- webpack:///~/imagediff/imagediff.js:37:4
Looking a bit at the source (not that I understand much), I see things like
if (typeof module !== 'undefined') { imagediff.imageDataToPNG = imageDataToPNG; }
even though I think webpack defines module.
Also
(function (name, definition) { var root = this;
I think this is undefined there (in strict mode).
I'm trying to use imagediff with webpack (actually, karma-webpack). During "compilation", I get
Then the tests are launched and I see
Looking a bit at the source (not that I understand much), I see things like
even though I think webpack defines module.
Also
I think this is undefined there (in strict mode).