question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PSA: Next version of UglifyJS and ecosystem

See original GitHub issue

Summary:

  • uglifyjs-webpack-plugin or webpack.optimize.UglifyJsPlugin will be upgraded to 1.0.x in a week and uses uglify-js@3/uglify-es

  • uglify-js@3 is not backward compatible to uglify-js@2, to which the latter is used in current upstream version (0.4.6) of uglifyjs-webpack-plugin


New features:

  • (Uglify-Es) ES6+ minification
  • (uglifyjs-webpack-plugin) UglifyJS parallelization (!)
  • (uglifyjs-webpack-plugin) Selective minification (you can include/exclude files to minify)

https://github.com/mishoo/UglifyJS2/tree/harmony https://github.com/webpack-contrib/uglifyjs-webpack-plugin

Currently in beta or prerelease stage, will be upstreamed sooner or later.

Code impacted: #1

Related:

  1. https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/95#issuecomment-318125994

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
pencilcheckcommented, Oct 31, 2017

Turns out the way to fix this is to use the comment suggestion by @rwieruch https://github.com/zeit/next.js/issues/1195#issuecomment-326901737

A newer Uglify fixed it. I’m guessing because the current Uglify bundled doesn’t support the new ES6 syntax fully, therefore it bugged out.

0reactions
stevefan1999-personalcommented, Oct 17, 2017

@pencilcheck Purge .next/ folder and node_modules then try building the project again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

uglify-js - npm
JavaScript parser, mangler/compressor and beautifier toolkit. Latest version: 3.17.4, last published: 2 months ago. Start using uglify-js in ...
Read more >
تويتر \ Webpack Contrib (WebpackContrib@) - Twitter
Reminder: Version 8.x for #nodejs goes LTS next week. If you are using 4.x, it's a good time to migrate. ١٣. ٢٢. أعادت...
Read more >
Webpack VS DomainLockJS - compare differences & reviews?
Atera offers remote IT monitoring & management (RMM), PSA, remote access, ... Next.js is a web development framework based on React.js, Node.js, webpack, ......
Read more >
React Tutorial: Cloning Yelp | Hacker News
This is not a tutorial on the basics of React -- this is written from the perspective of a large production level application....
Read more >
uglifyjs-webpack-plugin - npm package - Snyk
An important project maintenance signal to consider for uglifyjs-webpack-plugin is that it hasn't seen any new versions released to npm in the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found