-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Figured some wouldn't want this logged all the time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
We have |
…ouse into bundle-inline-terser
SGTM 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✂️ ✂️
Saves ~32 KB in CDT bundle.
We did the same thing already for the viewer #9823, but the
build-bundle
never got the same treatment.Here's what got trimmed:
axe.min.js
is quite big, and surfaced the fact thatminifyFileTransform
only 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.