This article will help you migrate your vercel.json
environment variables (legacy method) to the Environment Variables UI.
You may have configured the env
and build.env
legacy properties in a vercel.json
file:
{ "env": { "MY_KEY": "this is the value", "SECRET": "@my-secret-name" }, "build": { "env": { "MY_KEY": "this is the value", "SECRET": "@my-secret-name" } }}
We no longer recommend you use this legacy method for environment variables. Instead, we recommend you migrate your environment variables to the Environment Variables UI. Here is how to add the same envrionment variables setup to our Environment Variables UI using the example above:
Migrating to the Environment Variables UI will help you avoid errors when implementing your environment variables.
Once you have successfully moved your environment variables to the Environment Variables UI, make sure to redeploy your Vercel Project to reflect these new changes.