-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
29 lines (27 loc) · 839 Bytes
/
Copy pathvite.config.ts
File metadata and controls
29 lines (27 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import { defineConfig, loadEnv } from 'vite';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, '.', '');
return {
plugins: [react(), tailwindcss()],
define: {
'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY),
},
resolve: {
alias: {
'@': path.resolve(__dirname, '.'),
},
},
server: {
// FIX: Allow ngrok hostsr
allowedHosts: [
'ee6b-103-177-64-130.ngrok-free.app', // Your current specific host
'.ngrok-free.app' // Allows any ngrok-free.app subdomain
],
// HMR is disabled in AI Studio via DISABLE_HMR env var.
hmr: process.env.DISABLE_HMR !== 'true',
},
};
});