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
When a developer runs npm init svelte@next to create a new app and selects either the demo or skeleton project, the codebase generated for them contains a .gitignore file that will ignore a file that is named .env, but will not ignore env files with other names, such as the commonly used .env.local.
This makes it easy for developers to add their environment variables in a .env.local file, work on their project, then accidentally commit all the files for their project to git without realizing that their .env.local (and the potentially sensitive API keys therein) was included in the commit.
Describe the proposed solution
Add a .env.* line to the .gitignore files of the create-svelte package templates. This way, all files with a ".env." prefix will be git ignored by default, including .env.local.
Alternatives considered
n/a
Importance
nice to have
Additional Information
n/a
The text was updated successfully, but these errors were encountered:
Describe the problem
When a developer runs
npm init svelte@next
to create a new app and selects either the demo or skeleton project, the codebase generated for them contains a.gitignore
file that will ignore a file that is named.env
, but will not ignore env files with other names, such as the commonly used.env.local
.This makes it easy for developers to add their environment variables in a
.env.local
file, work on their project, then accidentally commit all the files for their project to git without realizing that their.env.local
(and the potentially sensitive API keys therein) was included in the commit.Describe the proposed solution
Add a
.env.*
line to the.gitignore
files of the create-svelte package templates. This way, all files with a ".env." prefix will be git ignored by default, including.env.local
.Alternatives considered
n/a
Importance
nice to have
Additional Information
n/a
The text was updated successfully, but these errors were encountered: