From 1043a0cf70b3d847933588b8d7ac3491cb2ee8c3 Mon Sep 17 00:00:00 2001 From: DamonCais <516181085@qq.com> Date: Thu, 20 Jul 2023 23:56:06 +0800 Subject: [PATCH] fix mpa configuration when the base was not empty --- packages/core/src/htmlPlugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/htmlPlugin.ts b/packages/core/src/htmlPlugin.ts index d8282e8..b8cebde 100644 --- a/packages/core/src/htmlPlugin.ts +++ b/packages/core/src/htmlPlugin.ts @@ -326,7 +326,7 @@ function createRewire( proxyUrlKeys: string[], ) { return { - from: new RegExp(`^/${reg}*`), + from: new RegExp(`^${baseUrl.endsWith('/')?baseUrl:baseUrl+'/'}${reg}*`), to({ parsedUrl }: any) { const pathname: string = parsedUrl.pathname