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

Drop "uglify": true from babel targets #1402

Merged
merged 1 commit into from
Apr 4, 2018
Merged

Conversation

ojab
Copy link
Contributor

@ojab ojab commented Apr 3, 2018

uglify-es (that supports es6) is used since 3.2.1, so we shouldn't downgrade js features to the ones supported by non-es uglify.

uglify-es (that supports es6) is used since 3.2.1, so we shouldn't
downgrade js features to the ones supported by non-es uglify
@danielpowell4
Copy link

At very least with this PR, it would be better to use "forceAllTransforms": true, over "uglify": true

Reference:
https://babeljs.io/docs/plugins/preset-env/#targetsuglify

@ojab
Copy link
Contributor Author

ojab commented Apr 4, 2018

This option is not available in babel-preset-env-1.x (which is used right now).
I assume that babel-preset-env-2.0 w/ "uglify" removed and "forceAllTransforms" added will be released along babel-7 and this option basically mirrors "uglify": true, downgrading js features to es5.

@gauravtiwari
Copy link
Member

@ojab Please correct me if I misunderstood the change, from plugin docs page, uglify option is available in 1.x but deprecated and replaced with forceAllTransforms in 2.x. We are still using 1.6.1 so the uglify option is still valid.

Anyway, I think what you want to change here is remove uglify option since we support es6 syntax by default right?

@ojab
Copy link
Contributor Author

ojab commented Apr 4, 2018

Yep, correct.

@gauravtiwari gauravtiwari merged commit 2281f09 into rails:master Apr 4, 2018
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