-
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
feat: add ssr types and refactor some logic #11784
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #11784 +/- ##
==========================================
- Coverage 29.01% 29.00% -0.02%
==========================================
Files 488 488
Lines 14835 14841 +6
Branches 3517 3514 -3
==========================================
Hits 4304 4304
- Misses 9771 9777 +6
Partials 760 760
☔ View full report in Codecov by Sentry. |
@@ -266,8 +266,9 @@ const getBrowser = ( | |||
// use ?. since routes patched with patchClientRoutes is not exists in opts.routes | |||
if (!isFirst && opts.routes[id]?.hasServerLoader) { | |||
// 在有basename的情况下__serverLoader的请求路径需要加上basename | |||
fetch((basename.endsWith('/') ? basename : basename + '/') + '__serverLoader?route=' + id, { | |||
credentials: 'include' | |||
const url = `${withEndSlash(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.
此合并冲突多余的引号在 #11726 删除。
重构少量 fix: SSR withoutHTML模式下,包一层<div id="root">{app}</div> #11724 、 feature: 支持serverLoader中读取url和headers #11755 两个 PR 里不优雅的书写。
新增
serverLoader
和useServerLoaderData
的类型。