Skip to content

Commit a34bfcd

Browse files
perf: don't emit issues via websocket for now (#59024)
1 parent 9f72146 commit a34bfcd

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/next/src/build/swc/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ interface BaseUpdate {
573573
path: string
574574
}
575575
diagnostics: unknown[]
576-
issues: unknown[]
576+
issues: Issue[]
577577
}
578578

579579
interface IssuesUpdate extends BaseUpdate {

packages/next/src/server/dev/hot-reloader-turbopack.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,12 @@ export async function createHotReloaderTurbopack(
313313
}
314314

315315
function sendTurbopackMessage(payload: TurbopackUpdate) {
316+
// TODO(PACK-2049): For some reason we end up emitting hundreds of issues messages on bigger apps,
317+
// a lot of which are duplicates.
318+
// They are currently not handled on the client at all, so might as well not send them for now.
319+
payload.diagnostics = []
320+
payload.issues = []
321+
316322
for (const client of clients) {
317323
clientStates.get(client)?.turbopackUpdates.push(payload)
318324
}

0 commit comments

Comments
 (0)