-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
leave process.env and dotenv for astro.config.mjs as is, and leave co…
…mments for reminder
- Loading branch information
Showing
3 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,22 @@ | ||
declare namespace NodeJS { | ||
/** for astro.config.mjs */ | ||
interface ProcessEnv { | ||
NODE_ENV: 'development' | 'production' | 'test'; | ||
SITE_URL: string; | ||
readonly NODE_ENV: 'development' | 'production' | 'test'; | ||
readonly SITE_URL: string; | ||
/** Optional in .env file but always defined in type. Default: false. */ | ||
PREVIEW_MODE: boolean; | ||
readonly PREVIEW_MODE: boolean; | ||
} | ||
} | ||
|
||
// same type repeated | ||
|
||
/** for import.meta.env for the rest of the code */ | ||
interface ImportMetaEnv { | ||
// NODE_ENV, SITE_URL... included by default | ||
|
||
readonly PREVIEW_MODE: boolean; | ||
} | ||
|
||
interface ImportMeta { | ||
readonly env: ImportMetaEnv; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters