Files
frontend/vite.config.js

23 lines
520 B
JavaScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
const APP_TARGET = '192.168.1.19:19090'
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}/api`,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}
}
}
})