17 lines
429 B
TypeScript
17 lines
429 B
TypeScript
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
server: {
|
|
port: 5173,
|
|
// 监听 0.0.0.0:局域网设备可访问开发中的管理界面
|
|
host: true,
|
|
proxy: {
|
|
'/api': 'http://localhost:3000',
|
|
// 精确到 /sub/,避免把前端路由 /subscriptions 也代理走
|
|
'^/sub/': 'http://localhost:3000',
|
|
},
|
|
},
|
|
});
|