Skip to content

Defining __DEV__ in build process conflicts with warning package #8661

Closed
@sdemjanenko

Description

@sdemjanenko

Is it required that __DEV__ be defined in the build process in order to optimize the build or is setting process.env.NODE_ENV enough?

When I tried setting __DEV__ to be true/false, my build process ran into an error.

 [commonjs] Unexpected keyword 'false' (17:4) in .../node_modules/warning/warning.js
file: .../node_modules/warning/warning.js:17:4
15:  */
16: 
17: var __DEV__ = process.env.NODE_ENV !== 'production';

I tracked this error down to:
https://github.com/BerkeleyTrue/warning/blob/master/warning.js#L17

It appears that the __DEV__ name is not unique enough such that the definition only targets apollo-client.

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