Configure Puppeteer to not download Chrome headless shell

Nowadays Chrome has a built-in (new) headless mode in the regular
binary, but before that time there was an old headless mode that was
essentially a separate binary [1]. We don't use the latter, but it turns
out that Puppeteer downloads it automatically if it's not explicitly
skipped, which is wasteful because it costs extra time and resources for
each `npm install` invocation.

This commit therefore skips downloading Chrome headless shell explictly,
which results in the local runtime of `npm install` going from 10.125
seconds to 8.998 seconds (which can't hurt in e.g. GitHub Actions).

[1] https://developer.chrome.com/blog/chrome-headless-shell.
This commit is contained in:
Tim van der Meij 2026-06-14 16:26:18 +02:00
parent 8560125056
commit 66c22b1fc5
No known key found for this signature in database
GPG Key ID: 8C3FD2925A5F2762

View File

@ -2,6 +2,9 @@
"chrome": {
"skipDownload": false
},
"chrome-headless-shell": {
"skipDownload": true
},
"firefox": {
"skipDownload": false,
"version": "nightly"