Skip to content

Commit 5902185

Browse files
committed
feat: support RegExp type proxy settings
1 parent 841d4ef commit 5902185

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/core/src/htmlPlugin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ function createRewire(
338338
return template
339339
}
340340
const isApiUrl = proxyUrlKeys.some((item) =>
341+
item.startsWith('^') && new RegExp(item).test(pathname) ||
341342
pathname.startsWith(path.resolve(baseUrl, item)),
342343
)
343344
return isApiUrl ? excludeBaseUrl : template

0 commit comments

Comments
 (0)