mozilla / mozilla/pdf.js

Update the Babel plugin to remove unused top-level constants

Open
#21,337 3 comments 0 reactions 1 assignee View on GitHub

@nicolo-ribaudo is already working on this.

Since May 26, 2026.

other
Dominant language
JavaScript
Stars
53.9k
Forks
10.7k
Avg merge
18h 38m
Merged PRs (30d)
130

Description

Looking at the built files there's currently top-level constants that are unused, but still get included in a "disabled" state, see e.g. https://searchfox.org/firefox-main/rev/9d2be0cb8dbf1c3a7ef6ba79be35d637d0327eaa/toolkit/components/pdfjs/content/build/pdf.mjs#93-97

Would it be possible to extend the Babel plugin to remove unused top-level constants?

/cc @nicolo-ribaudo

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.