how can I use the env vars in .env when deploying a worker via wrangler?

I have done it before, I ust don't know how 😂 I have an .env file on my dev environment and used wrangler deploy - it shipped the env variables in the file as well. However, my current project doesn't do this somehow. Any idea why?
4 Replies
Hello, I’m Allie!
Cloudflare Docs
Commands
Create, develop, and deploy your Cloudflare Workers with Wrangler commands.
LukeZ
LukeZOP•3w ago
aaah thx hm, I remember it doing that automatically though...
Hello, I’m Allie!
I don’t think it has ever done it automatically. That might be unsafe, since you probably don’t want to deploy your dev credentials to prod(unless you are already using prod credentials locally)
LukeZ
LukeZOP•3w ago
then I must have put the secrets manually and just dont remember doing it xD

Did you find this page helpful?