[isHMRRequest] assetPrefix can never be part of req.url, so remove it#66126
[isHMRRequest] assetPrefix can never be part of req.url, so remove it#66126edwinveldhuizen wants to merge 1 commit into
Conversation
|
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
1 similar comment
|
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
assetPrefix should also be able to work with a relative path afaik, as there are some checks somewhere to see if it's relative or not. Maybe unclear from the docs |
The docs state:
|
Mhhmmm, with "this use case" I think they mean all your page routes not your bundles. With basePath you are not able to prefix only your bundles, e.g. having the routes |
|
Thank you for the PR! |
What?
Remove
assetPrefixfrom the isHMRRequest check which was accidentally added in #59471Why?
assetPrefixis supposed to be a full domain (https://nextjs.org/docs/pages/api-reference/next-config-js/assetPrefix)Therefore it can never be part of req.url
Currently this is breaking the hot module reload for dev environments that rely on the assetPrefix to be set
Fixes #51162