Skip to content
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

Update optimization plugin #479

Merged
merged 1 commit into from
Nov 26, 2018
Merged

Update optimization plugin #479

merged 1 commit into from
Nov 26, 2018

Conversation

tjheffner
Copy link
Contributor

@tjheffner tjheffner commented Nov 26, 2018

This should fix the extended lag seen at "92% chunk asset optimization UglifyJSPlugin" when compiling an app for prod.

This has been a common annoyance for webpack users lately, due to some unoptimized code for node 6 compatibility deep in uglifyJS
webpack-contrib/uglifyjs-webpack-plugin#272

one of the webpack maintainers recommends using the terser-webpack-plugin, which is another minify/uglify tool that will be the webpack standard in v5, but won't be updated/required for v4 due to some breaking changes.
facebook/create-react-app#4492 (comment)

some preliminary testing:

current status, master branch (uglifyJS)

build:pl
Version: webpack 4.23.1
Time: 326635ms

build:drupal
Version: webpack 4.23.1
Time: 303973ms

updated state, terser branch (terser-webpack-plugin)

build:pl
Version: webpack 4.23.1
Time: 34814ms

build:drupal
Version: webpack 4.23.1
Time: 29540ms

decrease in PL prod compile time: 291821ms or 4.86m faster
decrease in drupal prod compile time: 274433ms or 4.57m faster

@tjheffner tjheffner requested a review from a team November 26, 2018 22:20
Copy link
Contributor

@jryanconklin jryanconklin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me.

@tjheffner tjheffner merged commit 952b04a into master Nov 26, 2018
@tjheffner tjheffner deleted the use-terser branch November 26, 2018 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants