From 0bb478cb239b41a9f725e74d812e6fdf501e7072 Mon Sep 17 00:00:00 2001 From: Takashi Tamura Date: Wed, 2 Nov 2022 08:33:31 +0900 Subject: [PATCH] Move canvas to optionalDependencies, which enables npm to continue installing pdfjs-dist even if the installation of canvas fails. Close #15652 --- gulpfile.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index a47f33459..ee64e0d95 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2168,8 +2168,10 @@ function packageJson() { homepage: DIST_HOMEPAGE, bugs: DIST_BUGS_URL, license: DIST_LICENSE, - dependencies: { + optionalDependencies: { canvas: "^2.10.1", + }, + dependencies: { "web-streams-polyfill": "^3.2.1", }, browser: {