-
Notifications
You must be signed in to change notification settings - Fork 27.8k
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
Docs: No info on environment variables in the /src folder #33110
Comments
If you want to open a PR, here are the relevant files: https://github.com/vercel/next.js/blob/canary/docs/basic-features/environment-variables.md |
Docs: No info on environment variables in the /src folder vercel#33110 link to the docs => https://nextjs.org/docs/advanced-features/src-directory
Proposes fix to #33110 Adds info on environment variables and the /src folder in the following docs: - https://nextjs.org/docs/advanced-features/src-directory - https://nextjs.org/docs/basic-features/environment-variables#loading-environment-variables ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [x] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint` Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
…into cms-builder-io-example * 'cms-builder-io-example' of github.com:teleaziz/next.js: (22 commits) drop dynamic import with `ssr: false` on server-side (vercel#32606) next-swc: fix ssg code elimination when used in render (vercel#32709) Add Caveats section to custom error page (vercel#33160) v12.0.8-canary.20 Allow dependencies to use environment variables in middlewares (vercel#33141) use a separate webpack runtime for middleware (vercel#33134) No info on environment variables in the src folder (vercel#33110) (vercel#33136) docs: minor text-copy cleanup (vercel#33120) Update swc (vercel#33063) Update next.config.js (vercel#33091) Adding Asset Component for Rich Text Renderer (vercel#32503) Update using-mdx.md (vercel#33077) v12.0.8-canary.19 Fix middleware at root in standalone mode (vercel#33053) Add util for generating new tests/error documents (vercel#33001) Remove extra config from tailwind example (vercel#33062) Fix link for Next.js Analytics in docs (vercel#33049) Bump `@vercel/nft` to 0.17.2 (vercel#33048) Update deployment documentation. (vercel#32006) v12.0.8-canary.18 ...
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What is the improvement or update you wish to see?
Change this line in this page:
To:
And add a note here:
Is there any context that might help us understand?
I've had this tiny issue that I didn't think of, but maybe one line in the documentation might help other people as well, since it's a small thing that is not mentioned: if you, by any chance, have environment variables in your /src folder, they're not gonna be read by the program. If you have them in the parent folder however, they will be read. Maybe it's not the most important problem around, but it would be great if it would be mentioned in the documentation somewhere (if not on both the Environment Variables page as well as the /src folder one).
Kind regards
Does the docs page already exist? Please link to it.
https://nextjs.org/docs/basic-features/environment-variables#loading-environment-variables
https://nextjs.org/docs/advanced-features/src-directory
The text was updated successfully, but these errors were encountered: