rsnext/packages
Lee Robinson 09a385669b
fix: ignore all .env files for create-next-app by default (#61920)
We've seen too many instances of folks accidentally committing their
`.env` files that I feel it's time to make this change.

Up until now, Next.js has recommended that you use `.env.local` when
working locally to store your environment variables. Some developers do
intentionally want to commit their `.env` file without secret values to
source control. However, the ecosystem is fragmented on `.local`
support.

There are tools which require secrets values that do _not_ support
`.local` and require using `.env`. This means that it's possible to dump
your secret values into a `.env` file and commit to source control,
thinking that the defaults would have you covered.

This change updates the defaults for `create-next-app` to ignore all
`.env` files by default. If you want to commit then, you opt-in by
modifying your `.gitignore`, versus the opposite.

Related: https://x.com/complexlity/status/1755890800527892716

---------

Co-authored-by: Sam Ko <sam@vercel.com>
2024-05-09 11:21:27 -07:00
..
create-next-app fix: ignore all .env files for create-next-app by default (#61920) 2024-05-09 11:21:27 -07:00
eslint-config-next v14.3.0-canary.53 2024-05-09 17:22:50 +00:00
eslint-plugin-next v14.3.0-canary.53 2024-05-09 17:22:50 +00:00
font v14.3.0-canary.53 2024-05-09 17:22:50 +00:00
next v14.3.0-canary.53 2024-05-09 17:22:50 +00:00
next-bundle-analyzer v14.3.0-canary.53 2024-05-09 17:22:50 +00:00
next-codemod v14.3.0-canary.53 2024-05-09 17:22:50 +00:00
next-env v14.3.0-canary.53 2024-05-09 17:22:50 +00:00
next-mdx v14.3.0-canary.53 2024-05-09 17:22:50 +00:00
next-plugin-storybook v14.3.0-canary.53 2024-05-09 17:22:50 +00:00
next-polyfill-module v14.3.0-canary.53 2024-05-09 17:22:50 +00:00
next-polyfill-nomodule v14.3.0-canary.53 2024-05-09 17:22:50 +00:00
next-swc v14.3.0-canary.53 2024-05-09 17:22:50 +00:00
react-refresh-utils v14.3.0-canary.53 2024-05-09 17:22:50 +00:00
third-parties v14.3.0-canary.53 2024-05-09 17:22:50 +00:00