Spaces:
Sleeping
Sleeping
import { defineConfig, loadEnv } from 'vite'; | |
import react from '@vitejs/plugin-react'; | |
export default defineConfig(({ mode }) => { | |
// For development, load from .env files | |
const env = loadEnv(mode, '.', ''); | |
return { | |
plugins: [react()], | |
// Don't embed API keys at build time - let them be read at runtime | |
define: { | |
'process.env.NODE_ENV': JSON.stringify(mode) | |
} | |
}; | |
}); | |