-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add Terser as minifier #26
Conversation
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.
LGTM so far.
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.
What's the advantage of using fingerprinting
for hashing the file name vs using Webpack's hashing?
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.
Overall 👍, requesting comments to make sure we have enough debugging information for if/when minification fails.
// Return on a minification error. | ||
// | ||
if (results.error) { | ||
return done(results.error); |
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.
while we're in here, can we make sure we know when minification is starting/done in status events (and probably which minifier is being used)? and make sure that this error from the minifiers get tagged in status events in such a way that we know they originated from minification (and which minfiier).
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.
Good idea, but I'm going to consider this out of scope. https://github.com/godaddy/carpenterd-worker/blob/master/builder.js#L2 workers-factory
is only a dependency of carpenterd-worker
so I assume we most likely need to either do the work there or give the workers-factory
access to the writeStream
. I don't consider that to be something we want though. Ideally workers-factory
emits events which we can listen to somewhere around here https://github.com/godaddy/carpenterd-worker/blob/master/builder.js#L251-L272 Happy to make a ticket for this though.
Summary
Add support for Terser minification.
Changelog
Added.
Test Plan
Unit test added using Terser, ES6 source code and proper
wrhs.toml
fixture.