Skip to content

Commit

Permalink
feature: 支持在serverLoader中读取当前request,以实现在serverLoader中读取url中的参数和headers
Browse files Browse the repository at this point in the history
  • Loading branch information
奇风 committed Oct 19, 2023
1 parent 808c8d1 commit 9f54ac6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/server/src/ssr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const createJSXProvider = (
};

function createJSXGenerator(opts: CreateRequestHandlerOptions) {
return async (url: string, serverLoaderArg?: IServerLoaderArgs) => {
return async (url: string, serverLoaderArgs?: IServerLoaderArgs) => {
const {
routesWithServerLoader,
PluginManager,
Expand Down Expand Up @@ -95,7 +95,7 @@ function createJSXGenerator(opts: CreateRequestHandlerOptions) {
.map(
(id: string) =>
new Promise<void>(async (resolve) => {
loaderData[id] = await executeLoader(id, routesWithServerLoader, serverLoaderArg);
loaderData[id] = await executeLoader(id, routesWithServerLoader, serverLoaderArgs);
resolve();
}),
),
Expand Down

0 comments on commit 9f54ac6

Please sign in to comment.