diff --git a/src/handlers/next/create-manifest-handler.ts b/src/handlers/next/create-manifest-handler.ts index 40aa2dc..e9fbd70 100644 --- a/src/handlers/next/create-manifest-handler.ts +++ b/src/handlers/next/create-manifest-handler.ts @@ -6,7 +6,7 @@ import { withBaseURL } from "../../middleware"; import { AppManifest } from "../../types"; export type CreateManifestHandlerOptions = { - manifestFactory(context: { appBaseUrl: string }): AppManifest; + manifestFactory(context: { appBaseUrl: string }): AppManifest | Promise; }; /** @@ -18,7 +18,7 @@ export const createManifestHandler = (options: CreateManifestHandlerOptions) => const baseHandler: Handler = async (request) => { const { baseURL } = request.context; - const manifest = options.manifestFactory({ + const manifest = await options.manifestFactory({ appBaseUrl: baseURL, }); diff --git a/src/handlers/next/index.ts b/src/handlers/next/index.ts index 037eb05..9edd583 100644 --- a/src/handlers/next/index.ts +++ b/src/handlers/next/index.ts @@ -1 +1,2 @@ +export * from "./create-app-register-handler"; export * from "./create-manifest-handler";