Files
danyang-match/h5-demo/vite.config.ts
T
WorkBuddy 69ebf33e18
CI/CD Pipeline / Backend Build & Test (push) Waiting to run
CI/CD Pipeline / Admin Web Build (push) Waiting to run
CI/CD Pipeline / Mini Program Compile Check (push) Waiting to run
CI/CD Pipeline / Migration Validation (push) Blocked by required conditions
CI/CD Pipeline / Test Shell Guard (Phase 23 Gate) (push) Waiting to run
CI/CD Pipeline / UI Contracts (source-structure gates) (push) Waiting to run
CI/CD Pipeline / E2E (live stack) (push) Blocked by required conditions
release: freeze demo v1.1.0 2026-10-19
2026-10-19 20:36:22 +08:00

29 lines
756 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
// H5 演示端构建配置。
// - 开发端口 13521(strictPort;host:true 便于手机同局域网访问)
// - /api 代理到本机后端 8085(与 admin-web 同源策略)
// - build base=/h5/:产物部署在 nginx 的 /h5/ 子路径下(见 nginx-h5.conf)
export default defineConfig(({ command }) => ({
plugins: [vue()],
base: command === 'build' ? '/h5/' : '/',
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
},
},
server: {
port: 13521,
strictPort: true,
host: true,
proxy: {
'/api': {
target: 'http://localhost:8085',
changeOrigin: true,
},
},
},
}))