-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: 在有basename的情况下__serverLoader的请求路径需要加上basename #11739
Conversation
Co-authored-by: chencheng (云谦) <[email protected]>
以解决 react-dom/server renderToReadableStream 不存在的问题
… Workers的平台" This reverts commit 5b0946a.
Co-authored-by: 咲奈Sakina <[email protected]>
Co-authored-by: 咲奈Sakina <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #11739 +/- ##
=======================================
Coverage 28.94% 28.94%
=======================================
Files 485 485
Lines 14774 14774
Branches 3501 3502 +1
=======================================
Hits 4276 4276
Misses 9738 9738
Partials 760 760
☔ View full report in Codecov by Sentry. |
@@ -265,7 +265,8 @@ const getBrowser = ( | |||
// server loader | |||
// use ?. since routes patched with patchClientRoutes is not exists in opts.routes | |||
if (!isFirst && opts.routes[id]?.hasServerLoader) { | |||
fetch('/__serverLoader?route=' + id) | |||
// 在有basename的情况下__serverLoader的请求路径需要加上basename | |||
fetch((basename.endsWith('/') ? basename : basename + '/') + '__serverLoader?route=' + id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetch(`${withEndSlash(basename)}__serverLoader?route=${id}`)
function withEndSlash(s: string) {
return s.endsWith('/') ? s : `${s}/`
}
No description provided.