From de0a0b8357c9c70774f0aaff74468f2a09911bce Mon Sep 17 00:00:00 2001 From: Hector Ros Date: Tue, 20 Jan 2026 01:38:04 +0100 Subject: [PATCH] Fix import.meta.env error: use relative API URL The bundler doesn't process import.meta.env, use relative URL instead Co-Authored-By: Claude Sonnet 4.5 (1M context) --- src/api/client.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/api/client.ts b/src/api/client.ts index 3aa0e2e..ba414ce 100644 --- a/src/api/client.ts +++ b/src/api/client.ts @@ -1,9 +1,8 @@ import axios from 'axios' // Determine API URL based on environment -const API_URL = import.meta.env.PROD - ? 'https://api.fuq.tv/api' - : 'http://localhost:3000/api' +// In browser, we use relative URLs which will be proxied by the frontend server +const API_URL = '/api' // Create axios instance with default config export const apiClient = axios.create({