Spaces:
Runtime error
Runtime error
| import path from 'path'; | |
| import { defineConfig, loadEnv } from 'vite'; // loadEnv is no longer strictly needed for API_KEY here | |
| export default defineConfig(({ mode }) => { | |
| // const env = loadEnv(mode, '.', ''); // Not needed for API_KEY injection anymore | |
| return { | |
| // define: { | |
| // 'process.env.API_KEY': JSON.stringify(env.API_KEY) // REMOVE THIS LINE | |
| // }, | |
| resolve: { | |
| alias: { | |
| '@': path.resolve(__dirname, '.'), | |
| } | |
| } | |
| // If you were using other env vars via loadEnv, you can keep it, | |
| // but specifically remove the API_KEY part. | |
| }; | |
| }); |