fix typedRoutes when used with webpackBuildWorker (#59140)
When using `experimental.typedRoutes` in conjunction with `experimental.webpackBuildWorker`, type errors would be erroneously thrown during build. This is because the build workers are parallelized between multiple runtimes (edge, server, client), but the `typedRoutes` is unique to each `webpackBuild`. The state needs to shared between the different compile steps for each instance of the types plugin. This leverages plugin state to keep share the `typedRoutes` state amongst the different workers. Closes NEXT-1734 Fixes #58369
Showing
Please
register
or
sign in
to comment