diff --git a/packages/vite-plugin/src/index.ts b/packages/vite-plugin/src/index.ts index 285adafa6..91737e505 100644 --- a/packages/vite-plugin/src/index.ts +++ b/packages/vite-plugin/src/index.ts @@ -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}/` }