Unverified Commit 1fc18244 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Turbopack: Optimize addedRoutes and removedRoutes calculation (#83840)

## What?

Apply suggestion from this review:
https://github.com/vercel/next.js/pull/83829#discussion_r2352698323
parent 9c945690
...@@ -619,10 +619,12 @@ export async function createHotReloaderTurbopack( ...@@ -619,10 +619,12 @@ export async function createHotReloaderTurbopack(
const newRoutes = [...entrypoints.routes.keys()] const newRoutes = [...entrypoints.routes.keys()]
const addedRoutes = newRoutes.filter( const addedRoutes = newRoutes.filter(
(route) => !existingRoutes.includes(route) (route) =>
!currentEntrypoints.app.has(route) &&
!currentEntrypoints.page.has(route)
) )
const removedRoutes = existingRoutes.filter( const removedRoutes = existingRoutes.filter(
(route) => !newRoutes.includes(route) (route) => !entrypoints.routes.has(route)
) )
processTopLevelIssues(currentTopLevelIssues, entrypoints) processTopLevelIssues(currentTopLevelIssues, entrypoints)
......
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