Skip to content

Commit f6429ef

Browse files
YingAo2025liu
andauthored
fix:issue #102 (#133)
Avoid the problem of requests for html in the public directory being rewritten to index.html in the dev environment. Co-authored-by: liu <[email protected]>
1 parent 076182b commit f6429ef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/core/src/htmlPlugin.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,10 @@ function createRewire(
347347

348348
const template = path.resolve(baseUrl, page.template)
349349

350+
if (excludeBaseUrl.startsWith("/static")) {
351+
return excludeBaseUrl;
352+
}
353+
350354
if (excludeBaseUrl === '/') {
351355
return template
352356
}

0 commit comments

Comments
 (0)