Skip to content

Commit

Permalink
chore: tmp solution for runtime server loader path (#12243)
Browse files Browse the repository at this point in the history
* chore: tmp solution for runtime server loader path

* refactor: rename
  • Loading branch information
PeachScript authored Mar 28, 2024
1 parent 2c43662 commit d8feb8d
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit d8feb8d

Please sign in to comment.