fix: production crash due to undefined import.meta.env by adding env utility and updating build script

This commit is contained in:
bipproduction
2026-02-07 17:03:42 +08:00
parent 0dd2aa17d6
commit 60457b1f2f
6 changed files with 39 additions and 17 deletions

View File

@@ -1,7 +1,8 @@
import { createAuthClient } from "better-auth/react";
import { VITE_PUBLIC_URL } from "./env";
export const authClient = createAuthClient({
baseURL: import.meta.env.VITE_PUBLIC_URL || "http://localhost:3000",
baseURL: VITE_PUBLIC_URL,
});
export const { useSession, signIn, signOut, signUp, getSession } = authClient;