Skip to content

disable reduce_vars in uglify-es due to bug in code generation #4692

Closed
@xaviergonz

Description

@xaviergonz

Is this a bug report?

yes

Did you try recovering your dependencies?

yarn 1.7.0

Which terms did you search for in User Guide?

N/A

Environment

Environment:
OS: Windows 10
Node: 10.5.0
Yarn: 1.7.0
npm: 6.1.0
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found

Description

Basically, in uglify-es, the reduce_vars (set to true by default) sometimes generates bad code as seen in mishoo/UglifyJS#3122

Although it seems to be fixed (to be released in an hypothetical uglify-es 3.3.10), today I found out that actually uglify-es is no longer mantained (see mishoo/UglifyJS#3156), so my recommendation in the time being is to add reduce_vars: false in the compress section of the UglifyJSPlugin for the time being so nobody else finds this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions