Parse before passing to vite
This commit is contained in:
parent
356745814a
commit
ba66540edb
@ -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 '';
|
||||
}
|
||||
|
||||
|
||||
@ -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: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user