diff --git a/packages/next/src/client/components/router-reducer/fetch-server-response.ts b/packages/next/src/client/components/router-reducer/fetch-server-response.ts index 3816877cb9933..ab96cf39528c2 100644 --- a/packages/next/src/client/components/router-reducer/fetch-server-response.ts +++ b/packages/next/src/client/components/router-reducer/fetch-server-response.ts @@ -29,7 +29,6 @@ import { import { callServer } from '../../app-call-server' import { PrefetchKind } from './router-reducer-types' import { hexHash } from '../../../shared/lib/hash' -import { waitForWebpackRuntimeHotUpdate } from '../react-dev-overlay/app/hot-reloader-client' export interface FetchServerResponseOptions { readonly flightRouterState: FlightRouterState @@ -191,7 +190,7 @@ export async function fetchServerResponse( // In dev, the Webpack runtime is minimal for each page. // We need to ensure the Webpack runtime is updated before executing client-side JS of the new page. if (process.env.NODE_ENV !== 'production' && !process.env.TURBOPACK) { - await waitForWebpackRuntimeHotUpdate() + await require('../react-dev-overlay/app/hot-reloader-client').waitForWebpackRuntimeHotUpdate() } // Handle the `fetch` readable stream that can be unwrapped by `React.use`.