Skip to content

Commit

Permalink
misc: better comment
Browse files Browse the repository at this point in the history
  • Loading branch information
devjiwonchoi committed Aug 8, 2024
1 parent 9a770f8 commit d691ea9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/next/src/server/lib/router-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,9 @@ export async function initialize(opts: {
hmrPrefix = normalizedAssetPrefix(assetPrefix)

if (URL.canParse(hmrPrefix)) {
// pathname without trailing slash
// or if is '/', replace to '' to not conflict
// remove trailing slash from pathname
// return empty string if pathname is '/'
// to avoid conflicts with '/_next' below
hmrPrefix = new URL(hmrPrefix).pathname.replace(/\/$/, '')
}
}
Expand Down

0 comments on commit d691ea9

Please sign in to comment.