packServer/mobile-web/vite.config.ts
liufumingren 6e52f82cde chore: 入库手机网页(mobile-web)与局域网扫描脚本(tools)
- mobile-web/:独立的 Vue3 + TS + WeUI 手机网页(开发端口 7303、预览 7304,
  /api 反代到后端 7300);node_modules/、dist/ 由根 .gitignore 统一覆盖
- tools/scan-web-viewer.ps1:扫局域网 80 端口并按网页标题匹配设备的排查脚本

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-01 03:43:43 +08:00

22 lines
520 B
TypeScript

import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
const backend = process.env.VITE_BACKEND || 'http://127.0.0.1:7300';
export default defineConfig({
plugins: [vue()],
server: {
host: '127.0.0.1',
port: Number(process.env.VITE_MOBILE_PORT || 7303),
strictPort: true,
proxy: {
'/api': { target: backend, changeOrigin: true },
},
},
preview: {
host: '127.0.0.1',
port: Number(process.env.VITE_MOBILE_PREVIEW_PORT || 7304),
strictPort: true,
},
});