mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-08-25 16:05:39 -04:00
clean up remaining NEXT_PUBLIC_ environment variables
This commit is contained in:
@@ -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": [
|
||||
|
||||
Reference in New Issue
Block a user