Files
frontend/vite.config.js
NanamiAdmin 98788b8c9e fix: update default port values and app target configuration
Change default port values from empty strings to 0 in InstanceDetail form
Update APP_TARGET in vite config to use local network IP for development
2026-04-05 22:45:14 +08:00

23 lines
515 B
JavaScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
const APP_TARGET = '192.168.1.19:8080'
export default defineConfig({
define: {
__APP_TARGET__: JSON.stringify(APP_TARGET)
},
plugins: [vue()],
server: {
host: '0.0.0.0',
port: 3000,
proxy: {
'/api': {
target: `http://${APP_TARGET}`,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}
}
}
})