-
Notifications
You must be signed in to change notification settings - Fork 51
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
How to set .env variables? #247
Comments
I've got the same issue with vue, I'd expect that during build environment variables that are set in |
What I did to set env variables was:
And it worked. I still struggle with CI build, but that's another matter |
I am using environment variables in my app. Here is how I define the env vars: In the app project directory, I create two files: In each of these files I define the variables I need:
Then in my code, I read the value:
Note that my env vars needed to start with VUE_APP because that's what the docs told me: https://cli.vuejs.org/guide/mode-and-env.html#environment-variables |
When building my nuxt app I need to specify additional environment variables, which determine the manner in which the app is built, namely the custom variable 'IS_BUILD_AS_RENDERER'.
When I didn't use nx, I'd just execute "cross-env NODE_ENV=development IS_BUILD_AS_RENDERER=false nuxt-ts".
Is there a way to set this variable using this plugin?
Thanks for your help.
The text was updated successfully, but these errors were encountered: