File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -137,12 +137,14 @@ module.exports = defineConfig((commandLineArguments) => {
137137 if ( devMode ) return // Skip in development (uses loopback client)
138138
139139 // Detect deployment URL from environment
140+ // VERCEL_PROJECT_PRODUCTION_URL is set in all deployments but always points to production
140141 // VERCEL_URL contains the current deployment URL (preview or production)
141- // VERCEL_PROJECT_PRODUCTION_URL contains the production URL (fallback )
142- // CLIENT_URL can be used for custom configurations
142+ // For production: prefer VERCEL_PROJECT_PRODUCTION_URL (custom domain )
143+ // For preview: use VERCEL_URL (preview-specific URL)
143144 const deploymentUrl =
145+ ( process . env . VERCEL_ENV === 'production' &&
146+ process . env . VERCEL_PROJECT_PRODUCTION_URL ) ||
144147 process . env . VERCEL_URL ||
145- process . env . VERCEL_PROJECT_PRODUCTION_URL ||
146148 process . env . CLIENT_URL
147149
148150 if ( ! deploymentUrl ) {
You can’t perform that action at this time.
0 commit comments