Skip to content
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

chore: tmp solution for runtime server loader path #12243

Merged
merged 2 commits into from
Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/renderer-react/src/dataFetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ export function fetchServerLoader({
url: window.location.href,
}).toString();
// 在有basename的情况下__serverLoader的请求路径需要加上basename
const url = `${withEndSlash(basename)}__serverLoader?${query}`;
// FIXME: 先临时解自定义 serverLoader 请求路径的问题,后续改造 serverLoader 时再提取成类似 runtimeServerLoader 的配置项
const url = `${withEndSlash(
(window as any).umiServerLoaderPath || basename,
)}__serverLoader?${query}`;
fetch(url, {
credentials: 'include',
})
Expand Down
Loading