fix: production crash due to undefined import.meta.env by adding env utility and updating build script
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user