import { loadConfig } from './server/config.js'; import { defineConfig } from 'vite'; const config = await loadConfig(); export default defineConfig({ server: { host: '0.0.0.0', port: 5173, proxy: { '/api': `http://127.0.0.1:${config.server.port}` }, // Keep Vite's standard secret-file protections and add the JSON config variants. fs: { deny: ['.env', '.env.*', '*.{crt,pem}', '**/.git/**', '.config.json', '.config.json.*', '**/.config.json', '**/.config.json.*'] }, }, });