Skip to content

Commit

Permalink
refactor: PR umijs#11724 comment
Browse files Browse the repository at this point in the history
  • Loading branch information
fz6m committed Oct 23, 2023
1 parent c9d2281 commit 6986d63
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions packages/server/src/ssr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,19 @@ interface RouteLoaders {

export type ServerInsertedHTMLHook = (callbacks: () => React.ReactNode) => void;

interface CreateRequestHandlerOptions {
interface CreateRequestServerlessOptions {
/**
* only return body html
* @example <div id="root">{app}</div> ...
*/
withoutHTML?: boolean;
/**
* folder path for `build-manifest.json`
*/
sourceDir?: string;
}

interface CreateRequestHandlerOptions extends CreateRequestServerlessOptions {
routesWithServerLoader: RouteLoaders;
PluginManager: any;
manifest:
Expand All @@ -23,8 +35,6 @@ interface CreateRequestHandlerOptions {
createHistory: (opts: any) => any;
helmetContext?: any;
ServerInsertedHTMLContext: React.Context<ServerInsertedHTMLHook | null>;
withoutHTML?: boolean;
sourceDir?: string;
}

const createJSXProvider = (
Expand Down

0 comments on commit 6986d63

Please sign in to comment.