From 06fde3b1ab057ab40d4969dc32fa17ee06355482 Mon Sep 17 00:00:00 2001 From: Janka Uryga Date: Fri, 6 Dec 2024 12:34:33 +0100 Subject: [PATCH] add todo --- .../next/src/server/lib/router-utils/setup-dev-bundler.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/next/src/server/lib/router-utils/setup-dev-bundler.ts b/packages/next/src/server/lib/router-utils/setup-dev-bundler.ts index fbd60aa36b5ae..4d0e549fea291 100644 --- a/packages/next/src/server/lib/router-utils/setup-dev-bundler.ts +++ b/packages/next/src/server/lib/router-utils/setup-dev-bundler.ts @@ -966,6 +966,11 @@ async function startWatcher(opts: SetupOpts) { } } + // TODO: + // 1. what if the client hasn't come online yet? we need to detect that, buffer these, and send them later + // 2. what if multiple clients are connected? we need to somehow know which one sent the request. + // we might not even have a session id yet because that's in-memory and they may have refreshed the tab. + // maybe we need to push that id to the client in a set-cookie or something. hotReloader.send({ action: HMR_ACTIONS_SENT_TO_BROWSER.AFTER_ERROR, source: source,