clean up remaining NEXT_PUBLIC_ environment variables

This commit is contained in:
2025-04-13 16:28:00 -04:00
parent f08aa16862
commit b60fbcc15c
21 changed files with 137 additions and 117 deletions
-15
View File
@@ -12,21 +12,6 @@ import "./lib/env";
const nextConfig: NextConfig = {
reactStrictMode: true,
productionBrowserSourceMaps: true,
env: {
// same logic as metadataBase: https://nextjs.org/docs/app/api-reference/functions/generate-metadata#default-value
NEXT_PUBLIC_BASE_URL:
process.env.VERCEL_ENV === "production" && process.env.VERCEL_PROJECT_PRODUCTION_URL
? `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`
: process.env.VERCEL_ENV === "preview" && process.env.VERCEL_BRANCH_URL
? `https://${process.env.VERCEL_BRANCH_URL}`
: process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: `http://localhost:${process.env.PORT || 3000}`,
// freeze timestamp at build time for when server-side pages need a "last updated" date. calling Date.now() from
// pages using getServerSideProps will return the current(ish) time instead, which is usually not what we want.
NEXT_PUBLIC_RELEASE_TIMESTAMP: new Date().toISOString(),
},
pageExtensions: ["js", "jsx", "ts", "tsx", "md", "mdx"],
outputFileTracingIncludes: {
"/notes/[slug]/opengraph-image": [