Add Support for More .env Files
See original GitHub issueProblem
I primarily use Prisma with Next.js, and since Next 9.4 they’ve implemented automatic .env detection, based on Create React App’s pattern: https://create-react-app.dev/docs/adding-custom-environment-variables/#what-other-env-files-can-be-used
When doing local development, my DATABASE_URL variable is kept in .env.local, which isn’t found by default when I run prisma generate
so Prisma commands tend to require some overhead/repetition in my repo.
Suggested solution
Support for the additional .env files used by the popular JS meta frameworks.
Alternatives
A set of local development-specific Prisma commands using dotenv-cli
Issue Analytics
- State:
- Created 3 years ago
- Reactions:54
- Comments:6
Top Results From Across the Web
Using multiple .env files. - Prisma
One solution is to have multiple .env files which each represent different environments. In practice this means you create a file for each...
Read more >Customizing Node.js .env files - LogRocket Blog
Learn how to configure a Node.js application via environment variables and customize an .env file with new environment variables.
Read more >env files support - IntelliJ IDEs Plugin - JetBrains Marketplace
Go to declaration(in . env file) and usages(in code), by Ctrl(Cmd)+click or hot key(Ctrl(Cmd)-B, etc.)
Read more >We need to talk about the .env | Platform.sh
.env files are increasingly popular as a way to configure an application. This loose standard offers a number of benefits, most of which...
Read more >Toggle between multiple .env files like .env.development with ...
@goldenmaza You shouldn't need to place this in every JS file. You'll want to add this as early as possible to your application...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Bump on this request
Yes! We also need this for Blitz. Here’s another issue for the same thing: https://github.com/prisma/prisma/issues/3720