import vue from '@vitejs/plugin-vue'; import { defineConfig } from 'vitest/config'; // dev server 固定 5175。P2 Task 6 起不再代理 /v1:前端直连 VITE_API_BASE // (缺省 ov 入口 127.0.0.1:8081,见 src/api/client.ts)——跨源访问由 API 侧 // CORS_ORIGINS 放行(根 .env 含 5175 的 localhost/127.0.0.1 两形);admin 入口 // (5176)仍各自代理 /v1 → cn 8080(journey 管理腿不走此处)。 // host 显式 127.0.0.1:Windows 下 localhost 默认可能只绑 [::1],e2e 探活走 IPv4。 export default defineConfig({ plugins: [vue()], server: { host: '127.0.0.1', port: 5175, strictPort: true, }, preview: { host: '127.0.0.1', port: 5175, strictPort: true }, test: { environment: 'jsdom', // 仅收集组件/单元测试;e2e/ 归 Playwright(test:e2e) include: ['src/**/*.{test,spec}.ts'], }, });