updated network for proxy use

This commit is contained in:
2025-11-01 11:28:16 +01:00
parent 00b48c1f41
commit 0614b2f3f8
8 changed files with 252 additions and 35 deletions

View File

@@ -28,7 +28,7 @@
"framer-motion": "12.23.24"
},
"scripts": {
"dev": "vite",
"dev": "vite dev",
"build": "tsc && vite build",
"preview": "vite preview"
}

View File

@@ -14,14 +14,14 @@ export default defineConfig(({ mode }) => {
NODE_ENV: mode,
ENABLE_PRO: env.ENABLE_PRO || 'false',
VITE_APP_TITLE: env.APP_TITLE || 'Shift Planning App',
VITE_API_URL: isProduction ? '/api' : 'http://localhost:3002/api',
VITE_API_URL: isProduction ? '/api' : '/api',
}
return {
plugins: [react()],
server: isDevelopment ? undefined : {
port: 3002,
server: isDevelopment ? {
port: 3003,
host: true,
open: true,
proxy: {
@@ -31,7 +31,7 @@ export default defineConfig(({ mode }) => {
secure: false,
}
}
},
} : undefined,
build: {
outDir: 'dist',