We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a770f8 commit d691ea9Copy full SHA for d691ea9
packages/next/src/server/lib/router-server.ts
@@ -670,8 +670,9 @@ export async function initialize(opts: {
670
hmrPrefix = normalizedAssetPrefix(assetPrefix)
671
672
if (URL.canParse(hmrPrefix)) {
673
- // pathname without trailing slash
674
- // or if is '/', replace to '' to not conflict
+ // remove trailing slash from pathname
+ // return empty string if pathname is '/'
675
+ // to avoid conflicts with '/_next' below
676
hmrPrefix = new URL(hmrPrefix).pathname.replace(/\/$/, '')
677
}
678
0 commit comments