hey, actually I think it is a typo in
hey, actually I think it is a typo in documentation. Wrangler does not accept
env.staging.vars
and throws an error: The supported named-environments for Pages are "preview" and "production".
4 Replies
where is the typo?
Please take a look again on the message I wrote: https://discord.com/channels/595317990191398933/789155108529111069/1265819427555905606
Especially the part:
I have put the
[env.staging.vars]
in my wrangler.toml
file and it results in an error The supported named-environments for Pages are "preview" and "production".
In the response of a message linked above, I've got an answer from you that:
which looks like, based on the error message, is not the case.I know that this documentation: https://developers.cloudflare.com/workers/configuration/environment-variables/
refers to a Workers, is there a documentation for Pages or they are just "similar"?
Cloudflare Docs
Environment variables · Cloudflare Workers docs
Attach text strings and JSON values as environment variables to your Worker.
I think a note in documentation would have sense that only supported environments for Cloudflare Pages in wrangler.toml are "production" and "preview" and the ".dev.vars" file.