Older versions of pixelmatch (<= 4) don't attach to module. It adds a few bytes, but changing module.exports = pixelmatch; to module && (module.exports = pixelmatch); would make it a bit more client-friendly for those who want to use pixelmatch outside a build.
It's possible to use pixelmatch 5 in a
<script>
tag using the following pattern:Older versions of pixelmatch (<= 4) don't attach to
module
. It adds a few bytes, but changingmodule.exports = pixelmatch;
tomodule && (module.exports = pixelmatch);
would make it a bit more client-friendly for those who want to use pixelmatch outside a build.