Skip to content

Commit

Permalink
Merge pull request #741 from contember/fix/vite-middleware
Browse files Browse the repository at this point in the history
fix/vite middleware
  • Loading branch information
matej21 authored Jul 3, 2024
2 parents 1558c65 + b5fdd16 commit 32c8fc7
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 32c8fc7

Please sign in to comment.