Skip to content

Commit

Permalink
fix(build): normalize html path (#15554)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea authored Jan 11, 2024
1 parent ce5a2ed commit d0d5938
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/vite/src/node/plugins/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,8 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin {

async transform(html, id) {
if (id.endsWith('.html')) {
const relativeUrlPath = path.posix.relative(
config.root,
normalizePath(id),
)
id = normalizePath(id)
const relativeUrlPath = path.posix.relative(config.root, id)
const publicPath = `/${relativeUrlPath}`
const publicBase = getBaseInHTML(relativeUrlPath, config)

Expand Down

0 comments on commit d0d5938

Please sign in to comment.