Skip to content

Commit

Permalink
fix:issue #102 (#133)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
YingAo2025 and liu authored Jan 15, 2024
1 parent 076182b commit f6429ef
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core/src/htmlPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,10 @@ function createRewire(

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

if (excludeBaseUrl.startsWith("/static")) {
return excludeBaseUrl;
}

if (excludeBaseUrl === '/') {
return template
}
Expand Down

1 comment on commit f6429ef

@qianjujie
Copy link

@qianjujie qianjujie commented on f6429ef Feb 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Please # to comment.