`canvas` has been added to the dependency, not devDependency, since v3.0.279. I don't think it is a good idea. Because `node-canvas` prebuilds aren't available for ARM, users with macOS on ARM will request helps from you, which would increase the maintenance burden. We can say the same thing for users with old Linux for which `node-canvas` prebuilds aren't available.

When GitHub actions supports macOS on ARM, the situation would change.

- https://github.com/Automattic/node-canvas/issues/1511

- https://github.com/mozilla/pdfjs-dist/blob/f6eefc659269fe422cc350fe2eef769251eec33d/package.json#L15-L18
```json
  "dependencies": {
    "canvas": "^2.10.1",
    "web-streams-polyfill": "^3.2.1"
  },
```

Configuration:
- PDF.js version: 3.0.279

/* Copyright 2016 Mozilla Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
"use strict";
const autoprefixer = require("autoprefixer");
const postcssDirPseudoClass = require("postcss-dir-pseudo-class");
const postcssLogical = require("postcss-logical");
const fs = require("fs");