Move canvas to optionalDependencies, which enables npm to continue installing pdfjs-dist

even if the installation of canvas fails. Close #15652
This commit is contained in:
Takashi Tamura 2022-11-02 08:33:31 +09:00
parent 6193537cd3
commit 0bb478cb23

View File

@ -2168,8 +2168,10 @@ function packageJson() {
homepage: DIST_HOMEPAGE, homepage: DIST_HOMEPAGE,
bugs: DIST_BUGS_URL, bugs: DIST_BUGS_URL,
license: DIST_LICENSE, license: DIST_LICENSE,
dependencies: { optionalDependencies: {
canvas: "^2.10.1", canvas: "^2.10.1",
},
dependencies: {
"web-streams-polyfill": "^3.2.1", "web-streams-polyfill": "^3.2.1",
}, },
browser: { browser: {