init: init proj
This commit is contained in:
16
web/vite.config.ts
Normal file
16
web/vite.config.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
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',
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user