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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: better explain how environment variables work in production #27189

Merged
merged 5 commits into from
May 14, 2024

Conversation

martinszeltins
Copy link
Contributor

馃摎 Description

We see a lot of people still being confused about why their .env or .env.prod files are not being read in production, especially people coming from Laravel or other PHP frameworks where .env files are being picked up automatically in production. Nuxt does it slightly differently, since it can be deployed to serverless or edge environments where a traditional filesystem isn't even available. So hopefully this will clear the confusion and explain the reasoning behind this design decision.

This PR also lists some specific ways that env variables can be set in production so people are not left wondering how to do it.

We see a lot of people coming from Laravel or other frameworks confused about how environment variables work in production in Nuxt. Hopefully this will clear the confusion.
Copy link

stackblitz bot commented May 13, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@danielroe danielroe merged commit b90936b into nuxt:main May 14, 2024
6 checks passed
@github-actions github-actions bot mentioned this pull request May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants