Skip to content

Commit 4525fd0

Browse files
committed
Remove fine-grained HDR for current dev server
1 parent 1fd85f6 commit 4525fd0

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

packages/remix-react/browser.tsx

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -161,28 +161,23 @@ if (import.meta && import.meta.hot) {
161161
// This is temporary API and will be more granular before release
162162
router._internalSetRoutes(routes);
163163

164-
if (needsRevalidation.size === 0) {
165-
Object.assign(window.__remixManifest, assetsManifest);
166-
window.$RefreshRuntime$.performReactRefresh();
167-
} else {
168-
// Wait for router to be idle before updating the manifest and route modules
169-
// and triggering a react-refresh
170-
let unsub = router.subscribe((state) => {
171-
if (state.revalidation === "idle") {
172-
unsub();
173-
// Abort if a new update comes in while we're waiting for the
174-
// router to be idle.
175-
if (signal.aborted) return;
176-
// Ensure RouterProvider setState has flushed before re-rendering
177-
setTimeout(() => {
178-
Object.assign(window.__remixManifest, assetsManifest);
179-
window.$RefreshRuntime$.performReactRefresh();
180-
}, 1);
181-
}
182-
});
183-
window.__remixRevalidation = (window.__remixRevalidation || 0) + 1;
184-
router.revalidate();
185-
}
164+
// Wait for router to be idle before updating the manifest and route modules
165+
// and triggering a react-refresh
166+
let unsub = router.subscribe((state) => {
167+
if (state.revalidation === "idle") {
168+
unsub();
169+
// Abort if a new update comes in while we're waiting for the
170+
// router to be idle.
171+
if (signal.aborted) return;
172+
// Ensure RouterProvider setState has flushed before re-rendering
173+
setTimeout(() => {
174+
Object.assign(window.__remixManifest, assetsManifest);
175+
window.$RefreshRuntime$.performReactRefresh();
176+
}, 1);
177+
}
178+
});
179+
window.__remixRevalidation = (window.__remixRevalidation || 0) + 1;
180+
router.revalidate();
186181
}
187182
);
188183
}

0 commit comments

Comments
 (0)