misc(build): use terser on inline assets#11461
Conversation
build/build-utils.js
Outdated
| } | ||
|
|
||
| if (result.code) { | ||
| // const saved = code.length - result.code.length; |
There was a problem hiding this comment.
Figured some wouldn't want this logged all the time.
There was a problem hiding this comment.
Who sees this? maybe behind a debug flag or something instead?
the dead code option is probably my last preference among
- just log it anyway
- log it when asked with a flag/env var/something
- never log it
- commented code
patrickhulce
left a comment
There was a problem hiding this comment.
I do get a smidge nervous about the quality of our devtools tests with changes like this though. it's times like these that full smoke coverage for DT would be awesome :)
how would you feel about skipping axe and just running on library detector for now since that's where most of the savings comes from anyway?
build/build-utils.js
Outdated
| } | ||
|
|
||
| if (result.code) { | ||
| // const saved = code.length - result.code.length; |
There was a problem hiding this comment.
Who sees this? maybe behind a debug flag or something instead?
the dead code option is probably my last preference among
- just log it anyway
- log it when asked with a flag/env var/something
- never log it
- commented code
Co-authored-by: Patrick Hulce <patrick.hulce@gmail.com>
We have |
…ouse into bundle-inline-terser
SGTM 👍 |
Saves ~32 KB in CDT bundle.
We did the same thing already for the viewer #9823, but the
build-bundlenever got the same treatment.Here's what got trimmed:
axe.min.jsis quite big, and surfaced the fact thatminifyFileTransformonly worked if the amount of code fits in w/e Node decides to be the chunk size in the file streaming. Had to fix that.