Skip to content

comparisons compression option in uglifyjs webpack prod config breaks on react-mapbox-gl #2376

Closed
@davidascher

Description

@davidascher

Can you reproduce the problem with latest npm?

Yes (including npm 5).

Description

There seems to be an incompatibility between CRA 1.0+ and the react-mapbox-gl component. This bug was not present before CRA 1.0, and only shows up in production mode, which makes me think it's a webpack 2.0 related issue.

Expected behavior

See https://github.com/davidascher/mapbox-repro-bug for a minimal test case (single component render -- works in development mode, doesn't work in production mode)

Actual behavior

In production mode (yarn build + serve -s build) , the map doesn't show and there's an incomprehensible traceback (as it's minified).

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected): react-scripts@1.0.6
  2. node -v: v7.9.0
  3. npm -v: 5.0.0 (but it happened with 4.x as well)

Then, specify:

  1. Operating system: OSX
  2. Browser and version: Chrome 58.0.3029.110

Reproducible Demo

Source: https://github.com/davidascher/mapbox-repro-bug

(trivial CRA repo with one dependency).

Live site showing bug: https://build-wnyrhmqiph.now.sh/

/cc @alex3165 as he is the maintainer of react-mapbox-gl AFAICT.

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