Commit Graph

3 Commits

Author SHA1 Message Date
Steven
a8ecf40d6f [build-utils] Fix getPrefixedEnvVars() to handle VERCEL_BRANCH_URL (#10315)
- Fixes [NEXT-1500](https://linear.app/vercel/issue/NEXT-1500)
- See
[documentation](https://vercel.com/docs/concepts/projects/environment-variables/system-environment-variables#framework-environment-variables)
2023-08-08 14:43:20 -04:00
Steven
8391734b5e [build-utils] Fix system env var detection for prefixed env vars (#9709)
This PR fixes a bug that was causing too many env vars to be exposed to the frontend by adding the framework `envPrefix`.

Some frameworks, such as CRA, will include all of these in the frontend even if not explicitly used so we must only prefix known [System Environment Variables](https://vercel.com/docs/concepts/projects/environment-variables/system-environment-variables).

This PR adds an allowlist to ensure this is handle properly.

- Fixes https://linear.app/vercel/issue/VCCLI-639
2023-03-24 05:45:27 +00:00
Steven
2b57e12ad3 [build-utils] Refactor framework prefixed env vars into shared function (#8166)
This consolidates the logic to get the framework-specific prefixed System Environment Variables into a single shared function so each builder can reuse the same function.

- Related to #7009 
- Related to #8306

In the future, this feature could be added to any other missing builders as well as `vc dev` but we'll save that for a new PR.
2022-08-05 00:51:52 +00:00