Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sitemap url for production deployments #5599

Merged
merged 3 commits into from
Aug 2, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions next.constants.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ export const ENABLE_STATIC_EXPORT =
*
* @see https://vercel.com/docs/concepts/projects/environment-variables/system-environment-variables#framework-environment-variables
*/
export const BASE_URL = process.env.NEXT_PUBLIC_VERCEL_URL
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
: process.env.NEXT_PUBLIC_BASE_URL || 'https://nodejs.org';
export const BASE_URL =
process.env.VERCEL_ENV === 'production'
styfle marked this conversation as resolved.
Show resolved Hide resolved
? 'https://nodejs.org'
: process.env.NEXT_PUBLIC_VERCEL_URL
? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}`
: process.env.NEXT_PUBLIC_BASE_URL || 'https://nodejs.org';

/**
* This is used for any place that requires the Node.js distribution URL (which by default is nodejs.org/dist)
Expand Down