From e9223c63bec609310774343c741f170b3d3ce7ac Mon Sep 17 00:00:00 2001 From: hanfei04 Date: Wed, 27 Jul 2022 11:00:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9umi=20dev=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/slave/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slave/index.ts b/src/slave/index.ts index 2708230..9a73e67 100644 --- a/src/slave/index.ts +++ b/src/slave/index.ts @@ -93,7 +93,9 @@ export default function(api: IApi, options: Options) { // source-map 跨域设置 if (process.env.NODE_ENV === 'development' && port) { // 变更 webpack-dev-server websocket 默认监听地址 - process.env.SOCKET_SERVER = `${protocol}://${localIpAddress}:${port}/`; + if(typeof process.env.SOCKET_SERVER === 'undefined') { + process.env.SOCKET_SERVER = `${protocol}://${localIpAddress}:${port}/`; + } api.chainWebpackConfig(memo => { // 禁用 devtool,启用 SourceMapDevToolPlugin memo.devtool(false);