-
Notifications
You must be signed in to change notification settings - Fork 472
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
Support .env
file for production / preview node preset
#1492
Comments
For cloudflare presets previews, there's builtin dotenv supports too, but the file needs to be named |
Good to know! My aim for this issue was mainly for Node presets but having other preset previews in mind, we might either leverage possible |
Currently, append |
Note that this feature should be coming to Node natively in 20.6. |
what if running in serverless environment rather than node server in future? |
Turns out the strong competition provided by deno and bun is working. We might have TS support in node at this rate 🤞🏽 |
It is quite often required to test production Node.js preset outputs with dotenv file. I am thinking of 3 possible ways:
node -r require/dotenv .output/server/index.mjs
(user needs dotenv local dependency)Need to check how much is actual runtime overhead of dotenv (it seems as low as 5KB).
Also worth to node that, the "local" kind presets (Bun and Deno) both already have built-in dotenv support via CLI args. And there is an ongoing discussion within Node.js team to make it build-in feature..
The text was updated successfully, but these errors were encountered: