Skip to content

Commit

Permalink
fix: can't import fonts outside the root
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Mar 2, 2021
1 parent 67e56e4 commit 555d5c9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 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,7 @@ 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 555d5c9

Please sign in to comment.