Skip to content

webpack.DefinePlugin and process.env.DEBUG #467

Description

@kdziamura

My webpack config:

...
plugins: [
  new webpack.DefinePlugin({
    'process.env': {
      NODE_ENV: JSON.stringify('production'),
      DEBUG: true
    }
  })
],

target: 'electron-main',
...

So webpack changes
process.env.DEBUG = namespaces;
to
true = namespaces;
which leading to error
ReferenceError: Invalid left-hand side in assignment

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-responseThis issue or pull request is awaiting a user's responsequestionThis issue asks a question or requests usage support

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions