Skip to content

Commit

Permalink
feat: support RegExp type proxy settings
Browse files Browse the repository at this point in the history
  • Loading branch information
youthug committed Mar 10, 2023
1 parent 841d4ef commit 5902185
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/src/htmlPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ function createRewire(
return template
}
const isApiUrl = proxyUrlKeys.some((item) =>
item.startsWith('^') && new RegExp(item).test(pathname) ||
pathname.startsWith(path.resolve(baseUrl, item)),
)
return isApiUrl ? excludeBaseUrl : template
Expand Down

0 comments on commit 5902185

Please sign in to comment.