Parse before passing to vite

This commit is contained in:
Michael Hines 2025-08-25 01:05:27 -05:00 committed by Wirasm
parent 356745814a
commit ba66540edb
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@
// Get the API URL from environment or construct it
export function getApiUrl(): string {
// For relative URLs in production (goes through proxy)
if (import.meta.env.PROD === 'true') {
if (import.meta.env.PROD) {
return '';
}

View File

@ -309,7 +309,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
define: {
'import.meta.env.VITE_HOST': JSON.stringify(host),
'import.meta.env.VITE_PORT': JSON.stringify(port),
'import.meta.env.PROD': JSON.stringify(env.PROD || false),
'import.meta.env.PROD': env.PROD === 'true',
},
resolve: {
alias: {