Skip to content

Commit b6fb2df

Browse files
committed
chore: tiny next.config.mjs simplification
1 parent 8318b5f commit b6fb2df

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

platforms/vercel/next.config.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export default {
1414
const VERCEL_URL = process.env.VERCEL_URL
1515
? `https://${process.env.VERCEL_URL}`
1616
: undefined;
17-
const NEXT_PUBLIC_BASE_URL = process.env.NEXT_PUBLIC_BASE_URL || VERCEL_URL;
1817

1918
return {
2019
// Expose Vercel's auto-assigned deployment URL as a platform-agnostic
@@ -23,7 +22,9 @@ export default {
2322
// contribute the entry when a value is actually present so downstream
2423
// truthiness vs. existence checks behave the same as if the var were
2524
// never set.
26-
env: NEXT_PUBLIC_BASE_URL ? { NEXT_PUBLIC_BASE_URL } : undefined,
25+
env: {
26+
NEXT_PUBLIC_BASE_URL: process.env.NEXT_PUBLIC_BASE_URL || VERCEL_URL,
27+
},
2728
};
2829
},
2930
};

0 commit comments

Comments
 (0)