diff --git a/.yarn/patches/pdfjs-dist-npm-4.3.136-35a0e70ced.patch b/.yarn/patches/pdfjs-dist-npm-4.3.136-35a0e70ced.patch new file mode 100644 index 000000000..4b3c15b1c --- /dev/null +++ b/.yarn/patches/pdfjs-dist-npm-4.3.136-35a0e70ced.patch @@ -0,0 +1,16 @@ +diff --git a/build/pdf.mjs b/build/pdf.mjs +index 003035596c3797888692cafd43f9466f96607d55..e69bc909492626f188ccff66b24a8d586fd96a30 100644 +--- a/build/pdf.mjs ++++ b/build/pdf.mjs +@@ -5303,8 +5303,9 @@ if (isNodeJS) { + const fs = await import( /*webpackIgnore: true*/"fs"), + http = await import( /*webpackIgnore: true*/"http"), + https = await import( /*webpackIgnore: true*/"https"), +- url = await import( /*webpackIgnore: true*/"url"); +- let canvas, path2d; ++ url = await import( /*webpackIgnore: true*/"url"), ++ canvas = await import( /*webpackIgnore: true*/"canvas"); ++ let path2d; + return new Map(Object.entries({ + fs, + http, diff --git a/package.json b/package.json index a0c2df9be..1746920cd 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "prettier": "^3.2.0" }, "resolutions": { - "eslint-plugin-import": "npm:eslint-plugin-i@^2.28.0" + "eslint-plugin-import": "npm:eslint-plugin-i@^2.28.0", + "pdfjs-dist": "patch:pdfjs-dist@npm:4.3.136#.yarn/patches/pdfjs-dist-npm-4.3.136-35a0e70ced.patch" }, "packageManager": "yarn@4.1.1" } diff --git a/yarn.lock b/yarn.lock index 6a01867e3..2154e4281 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4312,6 +4312,21 @@ __metadata: languageName: node linkType: hard +"pdfjs-dist@patch:pdfjs-dist@npm:4.3.136#.yarn/patches/pdfjs-dist-npm-4.3.136-35a0e70ced.patch::locator=react-pdf-monorepo%40workspace%3A.": + version: 4.3.136 + resolution: "pdfjs-dist@patch:pdfjs-dist@npm%3A4.3.136#.yarn/patches/pdfjs-dist-npm-4.3.136-35a0e70ced.patch::version=4.3.136&hash=d78cd3&locator=react-pdf-monorepo%40workspace%3A." + dependencies: + canvas: "npm:^2.11.2" + path2d: "npm:^0.2.0" + dependenciesMeta: + canvas: + optional: true + path2d: + optional: true + checksum: 10c0/df1b908fa225e5b5a58382b43d0e5462d0de9dc8a7a396f354236b44892cc648c13e1cc90c5e34c1177801c9eb5a6e794dbc67f1a3185b224a4f0846cf20c8de + languageName: node + linkType: hard + "picocolors@npm:^1.0.0": version: 1.0.0 resolution: "picocolors@npm:1.0.0"