Skip to content

Commit

Permalink
fix(vite-plugin): remove middleware use return from configure server
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasnobile committed Jul 3, 2024
1 parent 1558c65 commit b5fdd16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function contember(options?: ContemberOptions): Plugin {
},
configureServer(serve) {
if (!options?.disableMiddleware) {
return () => serve.middlewares.use((req, res, next) => {
serve.middlewares.use((req, res, next) => {
if (req.url === appPath || req.url?.startsWith(`${appPath}/`) && !req.url?.match(/\.\w+($|\?)/)) {
req.url = `${appPath}/`
}
Expand Down

0 comments on commit b5fdd16

Please sign in to comment.