consolidate environment variable parsing

This commit is contained in:
jake committed 2022-09-12 15:42:56 -04:00
1 parent 0373f806f6
commit c64d6cfb52
7 files changed
+434 -412

No files matched your search

+5
View File
@@ -5,3 +5,8 @@ export const NOTES_DIR = "notes";
// normalize the timestamp saved when building/deploying (see next.config.js) and fall back to right now:
export const RELEASE_DATE = new Date(process.env.RELEASE_DATE || Date.now()).toISOString();
// detect if running locally via `next dev` (phase is checked in next.config.js)
export const IS_DEV_SERVER = process.env.IS_DEV_SERVER === "true";
export const BUILD_ENV = process.env.VERCEL_ENV || process.env.NEXT_PUBLIC_VERCEL_ENV || process.env.NODE_ENV;