Skip to content

'comparisons' compression option results in incorrect code with react-mapbox-gl #2011

Closed
@davidascher

Description

@davidascher

Bug report. ES5 (transpiled by babel)

Uglify version (uglifyjs -V)

2.8.27

JavaScript input

See this repo: https://github.com/davidascher/mapbox-repro-bug

The original failure is that create-react-app 1.0 production builds that use react-mapbox-gl fail, while development builds work fine (that repo is the minimal such config I could make).

Further debugging indicates that the key difference between the two configurations is the use of the WebpackUglifyJS plugin, which calls out to uglify-js.

(the ejected branch shows the commit which fixes the bug in the production configuration: davidascher/mapbox-repro-bug@b0c95d2)

I'm afraid the bundles are not minimal from an uglify-js point of view, but I'm unable to narrow the test case any further.

Broken live site: https://build-wnyrhmqiph.now.sh/
Working live site: https://build-ijvjggnled.now.sh/

Tracking this bug in CRA as: facebook/create-react-app#2376

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions