Closed taesungh closed 10 months ago
Actually, NEXT_PUBLIC_VERCEL_URL
is available
Prefixed Environment Variables will be available during the Build Step (System Environment Variables Overview: Framework Environment Variables).
We should be able to switch to just VERCEL_URL
since this environment variable is not needed by the browser.
In some recent deployments, the server-side API calls were going to a different deployment because the
NEXT_PUBLIC_VERCEL_URL
was being baked into the build, and the Turborepo cache doesn't consider this as an input.If we do specify
NEXT_PUBLIC_VERCEL_URL
as a cache input key, this means we will never be able to utilize the cache since this environment variable changes for each deployment. To avoid this, we might be able to use a dynamic lookup to prevent inlining as shown in the documentation example.