Skip to content
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

Should we disable loading .env* on Workers Builds #374

Open
vicb opened this issue Feb 13, 2025 · 2 comments
Open

Should we disable loading .env* on Workers Builds #374

vicb opened this issue Feb 13, 2025 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested

Comments

@vicb
Copy link
Contributor

vicb commented Feb 13, 2025

ref: https://developers.cloudflare.com/workers/ci-cd/builds/

The adapter loads env vars from .env*.

Do we still want to do that on CD (i.e. Workers Build)?

While those files are not supposed to be checked in, it might help. We should probably align with whatever wrangler does with .dev.vars.

We should also document the behavior.

/cc @james-elicx

@vicb vicb added documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested labels Feb 13, 2025
@igoforth
Copy link

Last i heard, initCloudflareContextForNextDev copies env to process.env, is this still the plan for the future? Can I expect identical behavior in wrangler dev?

@vicb
Copy link
Contributor Author

vicb commented Feb 16, 2025

initCloudflareContextForNextDev is only about enabling getCloudflareContext.

But yes the adapter does copy cloudflare env (string values only, not JSON) to process.env for wrangler dev and deploy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants