Skip to content

webpack.DefinePlugin and process.env.DEBUG #467

Closed
@kdziamura

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

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