Is it possible to have more than 1 middleware files?
Answered
In&Out posted this in #help-forum
In&OutOP
Is it possible to have more than 1 middleware files? If so, how to do it?
Answered by aardani
Next.js will only and only read one milddleware.ts file. You can still import from other files to that middleware.ts file
4 Replies
Song Sparrow
hey did you figure it out?
For context, I'm looking to add Clerk's authentication middleware + internationalization (https://github.com/vercel/next.js/tree/canary/examples/app-dir-i18n-routing)
For context, I'm looking to add Clerk's authentication middleware + internationalization (https://github.com/vercel/next.js/tree/canary/examples/app-dir-i18n-routing)
Next.js will only and only read one milddleware.ts file. You can still import from other files to that middleware.ts file
Answer
In&OutOP
Okay thanks