Passing Variable to Webpack Config code example
Example: webpack env argument
// webpack.config.js
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV === 'production' ? 'production' : 'development')
})
]