`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

const IMAGE_DECODERS_LEGACY_DIR = BUILD_DIR + "image_decoders-legacy/";
const DEFAULT_PREFERENCES_DIR = BUILD_DIR + "default_preferences/";
const MINIFIED_DIR = BUILD_DIR + "minified/";
const MINIFIED_LEGACY_DIR = BUILD_DIR + "minified-legacy/";
const JSDOC_BUILD_DIR = BUILD_DIR + "jsdoc/";
const GH_PAGES_DIR = BUILD_DIR + "gh-pages/";
const SRC_DIR = "src/";
const LIB_DIR = BUILD_DIR + "lib/";
const DIST_DIR = BUILD_DIR + "dist/";
const TYPES_DIR = BUILD_DIR + "types/";
const TMP_DIR = BUILD_DIR + "tmp/";
const TYPESTEST_DIR = BUILD_DIR + "typestest/";
const COMMON_WEB_FILES = [
  "web/images/*.{png,svg,gif}",
  "web/debugger.{css,js}",
];
const MOZCENTRAL_DIFF_FILE = "mozcentral.diff";
const REPO = "git@github.com:mozilla/pdf.js.git";
const DIST_REPO_URL = "https://github.com/mozilla/pdfjs-dist";
const builder = require("./external/builder/builder.js");
const CONFIG_FILE = "pdfjs.config";
const config = JSON.parse(fs.readFileSync(CONFIG_FILE).toString());
const ENV_TARGETS = [
  "last 2 versions",
  "Chrome >= 85",
  "Firefox ESR",
  "Safari >= 14",
  "Node >= 14",
  "> 1%",
  "not IE > 0",