Skip to content

make UglifyJsPlugin more efficient  #1644

Closed
@shai32

Description

@shai32

I think we need to add more compress options in UglifyJsPlugin plugin,
this will result in a more compact build.

my suggestion is:

new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
screw_ie8: true,
conditionals: true,
unused: true,
comparisons: true,
sequences: true,
dead_code: true,
evaluate: true,
if_return: true,
join_vars: true,
},
mangle: {
screw_ie8: true
},
output: {
comments: false,
screw_ie8: true
}
})

Activity

gaearon

gaearon commented on Feb 26, 2017

@gaearon
Contributor

Send a PR and let's discuss?

shai32

shai32 commented on Feb 26, 2017

@shai32
Author

Ok

Timer

Timer commented on Mar 7, 2017

@Timer
Contributor

@shai32 are you still interested in this? 😄

shai32

shai32 commented on Mar 8, 2017

@shai32
Author

Yes, Still interesting. Hopefully I will do a PR in the weekend

shai32

shai32 commented on Mar 24, 2017

@shai32
Author

All the added options are enabled by default. See UglifyJS documentation.
So we can close this issue

locked and limited conversation to collaborators on Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Timer@gaearon@shai32

        Issue actions

          make UglifyJsPlugin more efficient · Issue #1644 · facebook/create-react-app