We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8318b5f commit b6fb2dfCopy full SHA for b6fb2df
1 file changed
platforms/vercel/next.config.mjs
@@ -14,7 +14,6 @@ export default {
14
const VERCEL_URL = process.env.VERCEL_URL
15
? `https://${process.env.VERCEL_URL}`
16
: undefined;
17
- const NEXT_PUBLIC_BASE_URL = process.env.NEXT_PUBLIC_BASE_URL || VERCEL_URL;
18
19
return {
20
// Expose Vercel's auto-assigned deployment URL as a platform-agnostic
@@ -23,7 +22,9 @@ export default {
23
22
// contribute the entry when a value is actually present so downstream
24
// truthiness vs. existence checks behave the same as if the var were
25
// never set.
26
- env: NEXT_PUBLIC_BASE_URL ? { NEXT_PUBLIC_BASE_URL } : undefined,
+ env: {
+ NEXT_PUBLIC_BASE_URL: process.env.NEXT_PUBLIC_BASE_URL || VERCEL_URL,
27
+ },
28
};
29
},
30
0 commit comments