enable dev|prod envs with simpler env vars system

This commit is contained in:
JCEEE
2026-08-06 18:09:47 +01:00
parent 2fc1668356
commit 4f384426d0
37 changed files with 447 additions and 256 deletions
+5 -4
View File
@@ -2,7 +2,6 @@ import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'vite';
import adapter from '@sveltejs/adapter-node';
import { sveltekit } from '@sveltejs/kit/vite';
import { SERVER_IP, FRONTEND_PORT, PROXY_PORT } from '../config.ts';
export default defineConfig(() => {
return {
@@ -25,11 +24,13 @@ export default defineConfig(() => {
fs: {
allow: ['.', './node_modules', '../node_modules']
},
allowedHosts: [SERVER_IP],
port: FRONTEND_PORT,
// Dev only: allow access via any host/LAN IP without hardcoding it.
allowedHosts: true,
port: 2080,
proxy: {
'/api': {
target: `http://${SERVER_IP}:${PROXY_PORT}`,
// The vite dev server and Hono proxy run on the same host.
target: `http://127.0.0.1:3456`,
changeOrigin: true
}
}