I am trying to inject the NODE_ENV value into my code using webpack via DefinePlugin. I checked, more or less, an identical question,
NODE_ENV
webpack
DefinePlugin
The DefinePlugin expects strings so you need to JSON.stringify() any values passed into it.
JSON.stringify()
new webpack.DefinePlugin({ PRODUCTION: JSON.stringify(PRODUCTION), DEVELOPMENT: JSON.stringify(DEVELOPMENT) })