cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.41k stars 593 forks source link

🚀 Feature Request: Enable dashboard enviroment variables overwriting in wrangler.toml for Pages #6183

Open yunnysunny opened 2 days ago

yunnysunny commented 2 days ago

Describe the solution

I need to create a wrangler.toml to tell Pages to use NodeJS compatible code. But If do that, the environment variables configured in dashboard will been removed, and I can only set them in wrangler.toml now. I do not want to use wrangler.toml to store my environment variables , because I will use the code for several Pages project. So I want to set variables in dashboard dynamically, and use wrangler.toml only to tell Functions I need NodeJS api to run my code.

I use keep_vars to skip reading variables in wrangler.toml, but got the error:

19:55:28.735 | ✘ [ERROR] Running configuration file validation for Pages:

19:55:28.735 |  
19:55:28.736 | - Configuration file for Pages projects does not support "keep_vars"