Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access environment variable #3

Open
lorrod opened this issue Mar 25, 2023 · 1 comment
Open

Access environment variable #3

lorrod opened this issue Mar 25, 2023 · 1 comment

Comments

@lorrod
Copy link

lorrod commented Mar 25, 2023

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'),
})
@ArthurStam
Copy link
Member

Hello. Let me think about correct way to pass user variables. It's a nice feature.

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

No branches or pull requests

3 participants