Fix the Next.js router in Turbopack when there are no middlewares (#46681)
## Bug Fixes WEB-681
This commit is contained in:
parent
ed51bd870b
commit
d9e01ad224
1 changed files with 3 additions and 3 deletions
|
@ -82,10 +82,10 @@ export async function makeResolver(
|
|||
|
||||
await devServer.matchers.reload()
|
||||
|
||||
if (middleware.files?.length) {
|
||||
// @ts-expect-error
|
||||
devServer.customRoutes = await loadCustomRoutes(nextConfig)
|
||||
// @ts-expect-error
|
||||
devServer.customRoutes = await loadCustomRoutes(nextConfig)
|
||||
|
||||
if (middleware.files?.length) {
|
||||
const matchers = middleware.matcher
|
||||
? getMiddlewareMatchers(middleware.matcher, nextConfig)
|
||||
: [{ regexp: '.*' }]
|
||||
|
|
Loading…
Reference in a new issue