You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We noticed that each app has a .env file. How can use custom environment variables defined here in the actual application? We tried to use the standard Vite, import.meta.env.KEY, but that doesn't seem to work. Our use case is that we want to integrate with some third-party apps, and we need to pass an Auth header with a secret to their API, but we don't want to hard code that into the application. So want to use ENV here. Thanks.
The text was updated successfully, but these errors were encountered:
Hi @osseonews, we changed the prefix from VITE_ to PUBLIC_ to better identify that the env variable will be publicly available to anyone in the bundle.
Last but not least, if you're running the application in your local env with pnpm dev, it runs the package index that works as an orchestrator for all the application. This means that in your local environment you'll need to set the env variables inside the index's .env file.
We noticed that each app has a .env file. How can use custom environment variables defined here in the actual application? We tried to use the standard Vite, import.meta.env.KEY, but that doesn't seem to work. Our use case is that we want to integrate with some third-party apps, and we need to pass an Auth header with a secret to their API, but we don't want to hard code that into the application. So want to use ENV here. Thanks.
The text was updated successfully, but these errors were encountered: