forked from elizaOS/LiveVideoChat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
21 lines (19 loc) · 832 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import react from '@vitejs/plugin-react'
import { defineConfig, loadEnv } from 'vite'
export default ({ mode }) => {
// Load environment variables and expose them as Vite environment variables
const env = loadEnv(mode, process.cwd())
return defineConfig({
plugins: [react()],
define: {
// Explicitly define the variables you want to inject into the build
'process.env': process.env, // This ensures Node-level env vars are accessible if needed
'import.meta.env.VITE_OPENAI_API_KEY': JSON.stringify(env.VITE_OPENAI_API_KEY),
'import.meta.env.VITE_SIMLI_API_KEY': JSON.stringify(env.VITE_SIMLI_API_KEY),
'import.meta.env.VITE_ELEVENLABS_API_KEY': JSON.stringify(env.VITE_ELEVENLABS_API_KEY),
},
server: {
port: 5173, // Change this to your desired port number
},
})
}