import { defineConfig } from 'vite'; import uni from '@dcloudio/vite-plugin-uni'; export default defineConfig({ plugins: [ uni(), // "@babel/plugin-proposal-nullish-coalescing-operator", // "@babel/plugin-proposal-optional-chaining" ], build: { sourcemap: true }, server: { proxy: { '/devHost': { target: 'https://intoystox.com', // 目标路径 // target: 'https://www.b-beng.com', // 目标路径 changeOrigin: true, // 改变请求源 secure: true, // 不使用HTTPS rewrite: (path) => path.replace(/^\/devHost/, ''), // 重写请求路径 }, } } });