import { fileURLToPath, URL } from "node:url"; import vue from "@vitejs/plugin-vue"; import { defineConfig } from "vite"; /** * 运营后台(决策 M6-3):单独构建、单独部署,私有化不交付。开发时跑在 127.0.0.1:5174, * 把 /ops 代理到 ops 进程 127.0.0.1:8019(bid-doctor ops)。样式只来自 docs/design/system。 */ export default defineConfig({ plugins: [vue()], resolve: { alias: { "@": fileURLToPath(new URL("./src", import.meta.url)), "@design": fileURLToPath(new URL("../../docs/design", import.meta.url)), // 和用户端共用组件样式(按钮、输入框、表格、卡片……),不复制(决策 M6-3) "@web-styles": fileURLToPath(new URL("../web/src/styles", import.meta.url)), }, }, server: { host: "127.0.0.1", port: 5174, strictPort: true, proxy: { "/ops": { target: "http://127.0.0.1:8019", changeOrigin: false } }, }, });