Skip to content

Commit

Permalink
[isHMRRequest] assetPrefix can never be part of req.url, so remove it
Browse files Browse the repository at this point in the history
  • Loading branch information
Edwin Veldhuizen committed May 23, 2024
1 parent 05e6b82 commit a59112b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/next/src/server/lib/router-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -648,10 +648,10 @@ export async function initialize(opts: {
})

if (opts.dev && developmentBundler && req.url) {
const { basePath, assetPrefix } = config
const { basePath } = config

const isHMRRequest = req.url.startsWith(
ensureLeadingSlash(`${assetPrefix || basePath}/_next/webpack-hmr`)
ensureLeadingSlash(`${basePath}/_next/webpack-hmr`)
)

// only handle HMR requests if the basePath in the request
Expand Down

0 comments on commit a59112b

Please sign in to comment.