1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Replace the DOMMatrix polyfill, used with Node.js, with the one from node-canvas

Fewer dependencies shouldn't be a bad idea in general, and given that the `node-canvas` package already include a `DOMMatrix` polyfill we can simply use that one instead.
This commit is contained in:
Jonas Jenwald 2022-09-27 12:12:50 +02:00
parent 5675a6ee64
commit c894be92fb
4 changed files with 19 additions and 23 deletions

View file

@ -50,9 +50,7 @@ if (
if (globalThis.DOMMatrix || !isNodeJS) {
return;
}
globalThis.DOMMatrix = __non_webpack_require__(
"dommatrix/dist/dommatrix.js"
);
globalThis.DOMMatrix = __non_webpack_require__("canvas").DOMMatrix;
})();
// Support: Node.js