Update the Babel plugin to remove unused top-level constants
Open
@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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.