| 1234567891011121314151617181920212223 |
- import { defineConfig, loadEnv } from 'vite'
- import vue from '@vitejs/plugin-vue'
- export default defineConfig(({ mode }) => {
- const env = loadEnv(mode, process.cwd())
- return {
- plugins: [vue()],
- server: {
- host: '0.0.0.0',
- port: Number(env.VITE_APP_PORT) || 3000,
- open: true,
- proxy: {
- '/api': {
- target: 'http://localhost:8080',
- changeOrigin: true,
- ws: true,
- rewrite: (path) => path.replace(/^\/api/, '')
- }
- }
- }
- }
- })
|