Skip to content

Commit b29aac8

Browse files
committed
Revert "feat(env): upgrade dotenv (#38481)"
This reverts commit 308a327.
1 parent 2c8606e commit b29aac8

File tree

3 files changed

+8
-37
lines changed

3 files changed

+8
-37
lines changed

docs/02-app/01-building-your-application/07-configuring/03-environment-variables.mdx

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,7 @@ export async function getStaticProps() {
4848

4949
<AppOnly>
5050

51-
> **Note**: Next.js also supports multiline variables inside of your `.env*` files:
52-
>
53-
> ```bash
54-
> # .env.local
55-
>
56-
> # you can write with line breaks
57-
> PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
58-
> ...
59-
> Kh9NV...
60-
> ...
61-
> -----END DSA PRIVATE KEY-----"
62-
>
63-
> # or with `\n` inside double quotes
64-
> PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nKh9NV...\n-----END DSA PRIVATE KEY-----\n"
65-
> ```
66-
67-
> **Note**: If you are using a `/src` folder, please note that Next.js will load the .env files **only** from the parent folder and **not** from the `/src` folder.
68-
> This loads `process.env.DB_HOST`, `process.env.DB_USER`, and `process.env.DB_PASS` into the Node.js environment automatically allowing you to use them in [Route Handlers](/docs/app/building-your-application/routing/route-handlers).
51+
This loads `process.env.DB_HOST`, `process.env.DB_USER`, and `process.env.DB_PASS` into the Node.js environment automatically allowing you to use them in [Route Handlers](/docs/app/building-your-application/routing/route-handlers).
6952

7053
For example:
7154

@@ -197,9 +180,3 @@ For example, if `NODE_ENV` is `development` and you define a variable in both `.
197180

198181
- If you are using a [`/src` directory](/docs/app/building-your-application/configuring/src-directory), `.env.*` files should remain in the root of your project.
199182
- If the environment variable `NODE_ENV` is unassigned, Next.js automatically assigns `development` when running the `next dev` command, or `production` for all other commands.
200-
201-
## Version History
202-
203-
| Version | Changes |
204-
| -------- | --------------------------------------------- |
205-
| `v9.4.0` | Support `.env` and `NEXT_PUBLIC_` introduced. |

packages/next-env/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"devDependencies": {
3232
"@vercel/ncc": "0.34.0",
33-
"dotenv": "16.3.1",
34-
"dotenv-expand": "10.0.0"
33+
"dotenv": "10.0.0",
34+
"dotenv-expand": "8.0.1"
3535
}
3636
}

pnpm-lock.yaml

Lines changed: 5 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)