mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
[api-minor] Remove the, in legacy
builds, bundled DOMMatrix
polyfill
According to the MDN compatibility data, see https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrix/DOMMatrix#browser_compatibility, all browsers that we support have native `DOMMatrix` implementations (since quite some time too). Hence Node.js is the only environment that lack `DOMMatrix` support, which probably isn't that surprising given that it's browser functionality. While the `DOMMatrix` polyfill isn't that large, it nonetheless seems completely unnecessary to bundle it in the `legacy` builds when it's not needed in browsers. However, we can avoid that by simply listing `dommatrix` as a dependency for the `pdfjs-dist` library.
This commit is contained in:
parent
3e593cfc1d
commit
157a71d404
2 changed files with 4 additions and 1 deletions
|
@ -50,7 +50,9 @@ if (
|
|||
if (globalThis.DOMMatrix || !isNodeJS) {
|
||||
return;
|
||||
}
|
||||
globalThis.DOMMatrix = require("dommatrix/dist/dommatrix.js");
|
||||
globalThis.DOMMatrix = __non_webpack_require__(
|
||||
"dommatrix/dist/dommatrix.js"
|
||||
);
|
||||
})();
|
||||
|
||||
// Provides support for *recent* additions to the Promise specification,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue