Closed kara-todd closed 3 years ago
Vercel doesn't support branch environment variables. Instead, there are only 3 default environments "Live", "Preview" and "Local"
Their recommend approach to set per-branch environment variables is to do something like following:
const host = process.env.VERCEL_GITHUB_COMMIT_REF === "qa" ? process.env.CRAFTGQL_QA_URL : process.env.CRAFTGQL_URL;
Unfortunately, this isn't currently supported as CRAFTGQL_URL is hard-coded in the plugin file. I think simply moving this to an override-able option using the environment as a default would solve the issue.
CRAFTGQL_URL
Description
Vercel doesn't support branch environment variables. Instead, there are only 3 default environments "Live", "Preview" and "Local"
Their recommend approach to set per-branch environment variables is to do something like following:
Unfortunately, this isn't currently supported as
CRAFTGQL_URL
is hard-coded in the plugin file. I think simply moving this to an override-able option using the environment as a default would solve the issue.