Unverified Commit 439279c2 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Revert "Turbopack: Remove matchers.reload() call on each request" (#83819)

Reverts vercel/next.js#83720
parent 90676585
...@@ -606,10 +606,6 @@ export default abstract class Server< ...@@ -606,10 +606,6 @@ export default abstract class Server<
this.responseCache = this.getResponseCache({ dev }) this.responseCache = this.getResponseCache({ dev })
} }
protected reloadMatchers() {
return this.matchers.reload()
}
private handleRSCRequest: RouteHandler<ServerRequest, ServerResponse> = ( private handleRSCRequest: RouteHandler<ServerRequest, ServerResponse> = (
req, req,
_res, _res,
......
...@@ -65,6 +65,10 @@ export class DevRouteMatcherManager extends DefaultRouteMatcherManager { ...@@ -65,6 +65,10 @@ export class DevRouteMatcherManager extends DefaultRouteMatcherManager {
pathname: string, pathname: string,
options: MatchOptions options: MatchOptions
): AsyncGenerator<RouteMatch<RouteDefinition<RouteKind>>, null, undefined> { ): AsyncGenerator<RouteMatch<RouteDefinition<RouteKind>>, null, undefined> {
// Compile the development routes.
// TODO: we may want to only run this during testing, users won't be fast enough to require this many dir scans
await super.reload()
// Iterate over the development matches to see if one of them match the // Iterate over the development matches to see if one of them match the
// request path. // request path.
for await (const developmentMatch of super.matchAll(pathname, options)) { for await (const developmentMatch of super.matchAll(pathname, options)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment