init
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import type { UserConfigExport } from '@tarojs/cli';
|
||||
export default {
|
||||
logger: {
|
||||
quiet: false,
|
||||
stats: true,
|
||||
},
|
||||
mini: {},
|
||||
h5: {
|
||||
devServer: {
|
||||
host: '0.0.0.0',
|
||||
port: 53402, // 与 Trae 预览代理的 ws=ws://localhost:53402 对齐
|
||||
open: false,
|
||||
// 允许 Trae 平台公网代理
|
||||
allowedHosts: 'all',
|
||||
client: { overlay: false },
|
||||
// 把 /api/* 反向代理到腾讯云后端,避免 H5 跨域 + 公网代理 IP 直连
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://124.221.67.199:3000',
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
logLevel: 'debug',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
} satisfies UserConfigExport<'webpack5'>;
|
||||
Reference in New Issue
Block a user