1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00

Remove comments from the *built* CSS files

The old pre-processor used for CSS, and HTML, files leaves comments intact which unnecessarily contributes to the overall size of the *built* CSS files (note that the built JavaScript files don't include comments).
Rather than trying to "hack" comment removal into the pre-processor it seems easier to use a PostCSS plugin instead. The one potential issue is that it also affects *some* whitespaces, and it's not clear to me if this'll work with the various CSS-related tests that run in mozilla-central.

Please refer to https://www.npmjs.com/package/postcss-discard-comments for additional information.
This commit is contained in:
Jonas Jenwald 2023-09-22 18:27:08 +02:00
parent 3f7060e777
commit 7413546e16
3 changed files with 45 additions and 7 deletions

View file

@ -41,6 +41,7 @@
"pngjs": "^7.0.0",
"postcss": "^8.4.30",
"postcss-dir-pseudo-class": "^8.0.0",
"postcss-discard-comments": "^6.0.0",
"postcss-nesting": "^12.0.1",
"prettier": "^3.0.3",
"puppeteer": "^21.2.1",