Closed derek-ye closed 2 months ago
Yeah, looks like we need to convert Pixelmatch to ESM to use it on the browser properly now. Meanwhile, as a workaround, maybe you could try using Skypack CDN which does CommonJS to ESM convertion automatically: https://cdn.skypack.dev/pixelmatch
pixelmatch v6.0.0 is now a module, so this should be fixed.
Description
I'm trying to embed the script in a static HTML file, but I'm running into the following error. I think it might be due to the script being a CommonJS module - any ideas on how I could fix this without converting the entire file to ESM?
HTML file: