Fix import.meta.env error: use relative API URL
All checks were successful
Build and Push Frontend / build (push) Successful in 5s
All checks were successful
Build and Push Frontend / build (push) Successful in 5s
The bundler doesn't process import.meta.env, use relative URL instead Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user