Files
blitzkit/packages/website-ue/src/game/game.ts
T

17 lines
479 B
TypeScript
Raw Normal View History

2026-05-05 17:43:12 -05:00
import { assertSecret } from "@blitzkit/core";
2026-05-18 16:45:36 -05:00
import type { GameInterface } from "@blitzkit/game";
2026-05-05 17:43:12 -05:00
import { clientUnmounted } from "./unmounted";
let _game: GameInterface | null = null;
2026-06-05 11:58:15 -05:00
if (!clientUnmounted && import.meta.env.SSR) {
2026-05-18 16:45:36 -05:00
const { GameInterface } = await import("@blitzkit/game");
2026-06-05 11:58:15 -05:00
2026-05-24 12:42:08 -05:00
_game = new GameInterface(
assertSecret(import.meta.env.PUBLIC_WOTB_CLIENT),
assertSecret(import.meta.env.WOTB_USMAP),
"../../temp",
);
}
export const game = _game;