Skip to content

Commit

Permalink
Only await Webpack Runtime update when Webpack is used
Browse files Browse the repository at this point in the history
Just saves a microtask cycle
  • Loading branch information
eps1lon committed Jul 12, 2024
1 parent bc9e932 commit 468a289
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ export async function fetchServerResponse(
// In prod, every page will have the same Webpack runtime.
// 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' && isNavigation) {
if (
process.env.NODE_ENV !== 'production' &&
isNavigation &&
!process.env.TURBOPACK
) {
await waitForWebpackRuntimeHotUpdate()
}

Expand Down

0 comments on commit 468a289

Please sign in to comment.