Skip to content

Commit

Permalink
fix: serving static files from root (#2309)
Browse files Browse the repository at this point in the history
  • Loading branch information
cawa-93 authored Mar 2, 2021
1 parent 67e56e4 commit 4f942be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vite/src/node/server/middlewares/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export function serveRawFsMiddleware(): Connect.NextHandleFunction {
if (url.startsWith(FS_PREFIX)) {
url = url.slice(FS_PREFIX.length)
if (isWin) url = url.replace(/^[A-Z]:/i, '')

req.url = url
serveFromRoot(req, res, next)
} else {
next()
Expand Down

0 comments on commit 4f942be

Please sign in to comment.