import type { UserConfigExport } from '@tarojs/cli'; export default { logger: { quiet: false, stats: true, }, mini: {}, h5: { devServer: { proxy: { '/dr': { target: 'http://192.168.11.4:6001', // 你的后端服务地址 changeOrigin: true, // 允许跨域 // pathRewrite: { // '^/dr/api': '' // 可选,用于重写路径 // } }, }, host: 'localhost', // 这里设置你想要的主机名, }, }, } satisfies UserConfigExport<'webpack5'>;