Skip to content

Commit

Permalink
fix: skip redirect and error fallback on middleware mode
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jun 30, 2021
1 parent e092e89 commit 802875c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite/src/node/server/index.ts
Expand Up @@ -463,7 +463,8 @@ export async function createServer(
}

// base
if (config.base !== '/') {
// skip base middleware on middleware mode, #4057
if (config.base !== '/' && !server.middlewares) {
middlewares.use(baseMiddleware(server))
}

Expand Down

0 comments on commit 802875c

Please sign in to comment.