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

Switch from uglifyjs-webpack-plugin to terser-webpack-plugin #3189

Merged
merged 2 commits into from
Dec 11, 2018

Conversation

sfusato
Copy link
Contributor

@sfusato sfusato commented Nov 29, 2018

uglify-es has been forked and the new project is called terser. For projects that need ES6 support, use it instead of uglify-es, since all new development will be happening over there (and things like webpack are switching over to it shortly too):
https://github.com/fabiosantoscode/terser

Copy link
Member

@Gazler Gazler left a comment

Choose a reason for hiding this comment

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

Will need to double check that this works as expected. Thanks for bringing it to our attention!

installer/templates/phx_assets/webpack/package.json Outdated Show resolved Hide resolved
installer/templates/phx_assets/webpack/webpack.config.js Outdated Show resolved Hide resolved
@robinvdvleuten
Copy link
Contributor

I use this setup as well in my Phoenix project and can confirm that this gives the same minified results compared to Uglify. I did a deep dive into this already for Next.js (vercel/next.js#5021), where they switched to Terser as well after I suggested it.

@Gazler Gazler self-assigned this Dec 11, 2018
@Gazler Gazler merged commit 091e7bb into phoenixframework:master Dec 11, 2018
@Gazler
Copy link
Member

Gazler commented Dec 11, 2018

Thanks <3

Gazler pushed a commit that referenced this pull request Sep 11, 2019
* Switch from uglifyjs-webpack-plugin to terser-webpack-plugin

* spaces instead of tabs
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