Currently the middleware generated by paraglide-next init is very compact, however it's not obvious how you would integrate it with other middleware. This increases our documentation effort.
Proposal
Change the generated middleware to
import { middleware as paraglide } from "@/lib/i18n"
export function middleware(request: NextRequest) {
const response = paraglide(request)
return response
}
This makes it more obvious how you would chain it with other middlewares
Context
Currently the middleware generated by
paraglide-next init
is very compact, however it's not obvious how you would integrate it with other middleware. This increases our documentation effort.Proposal
Change the generated middleware to
This makes it more obvious how you would chain it with other middlewares