Use Vite dev process checking instead of NODE_ENV

This commit is contained in:
2022-07-16 15:50:38 +02:00
parent 3b54a95fe4
commit c2005bbac2
2 changed files with 2 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
// Define API URL from environment
export const API_URL = import.meta.env.MODE === 'development'
export const API_URL = import.meta.env.DEV
? `${import.meta.env.VITE_API_URL_DEV}`
: `${import.meta.env.VITE_API_URL_PROD}`