Skip to content

Commit 74609bc

Browse files
committed
fix ssr type breakage
1 parent dbe30ca commit 74609bc

File tree

1 file changed

+6
-1
lines changed
  • packages/frontend/src/api

1 file changed

+6
-1
lines changed

packages/frontend/src/api/env.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { z } from "zod";
22
import { createEnv } from "@t3-oss/env-core";
33

4+
type Env = {
5+
env: Record<string, string | number | boolean>;
6+
};
7+
48
export const env = createEnv({
59
server: {
610
/**
@@ -54,7 +58,8 @@ export const env = createEnv({
5458
VITE_MENTOR_ROLE_ID: z.string(),
5559
},
5660
runtimeEnv:
57-
typeof window === "undefined" && !import.meta.env.SSR
61+
typeof window === "undefined" &&
62+
!(import.meta as unknown as { env: Record<string, string> }).env.SSR
5863
? process.env
5964
: (import.meta as unknown as { env: Record<string, string> }).env,
6065
clientPrefix: "VITE_PUBLIC",

0 commit comments

Comments
 (0)