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