feat: integrated with Amplitude in static website mode

This commit is contained in:
Li Xin
2025-05-08 11:13:52 +08:00
parent 98830dbd04
commit 0042b7276a
2 changed files with 18 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ export const env = createEnv({
*/
server: {
NODE_ENV: z.enum(["development", "test", "production"]),
AMPLITUDE_API_KEY: z.string().optional(),
},
/**
@@ -32,6 +33,7 @@ export const env = createEnv({
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL,
NEXT_PUBLIC_STATIC_WEBSITE_ONLY:
process.env.NEXT_PUBLIC_STATIC_WEBSITE_ONLY === "true",
AMPLITUDE_API_KEY: process.env.AMPLITUDE_API_KEY,
},
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially