Skip to content

Commit f6429ef

Browse files
YingAo2025liu
and
liu
authoredJan 15, 2024
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 <8185129+three-gold-bows@user.noreply.gitee.com>
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

+4
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
}

1 commit comments

Comments
 (1)

qianjujie commented on Feb 28, 2024

@qianjujie

问题还在,如果静态资源地址不是/static呢

Please sign in to comment.