webpack-boilerplate
webpack-boilerplate copied to clipboard
Access environment variable
Hello! Could you please help to solve the issue with getting environment variable? I have tried to access via:
process.env.VARIABLE_NAME
but it seems that webpack is not configured to pass process variable, am I right? I am getting Can't find variable: process
Also I have tried to pass environment variable using web pack with no luck:
new webpack.DefinePlugin({
'process.env.API_BASE_URL': JSON.stringify('https://api.example.com'),
})
Hello. Let me think about correct way to pass user variables. It's a nice feature.