mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2026-04-24 14:15:19 +00:00
adding app v2 (#943)
This commit is contained in:
38
www/appv2/vite.config.ts
Normal file
38
www/appv2/vite.config.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
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: {
|
||||
port: 3000,
|
||||
host: '0.0.0.0',
|
||||
// HMR disabled via env var for AI Studio
|
||||
hmr: process.env.DISABLE_HMR !== 'true',
|
||||
proxy: {
|
||||
// API requests → backend
|
||||
'/v1': {
|
||||
target: env.SERVER_API_URL || 'http://localhost:1250',
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
},
|
||||
// Auth proxy requests → Express auth server
|
||||
'/auth': {
|
||||
target: env.AUTH_PROXY_URL || 'http://localhost:3001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user