Remix Utils - v9.0.0
    Preparing search index...
    • Combine preloadLinkedAssets and preloadModuleAssets into a single function and preload both linked and module assets.

      Parameters

      • context: EntryContext

        Remix's EntryContext

      • headers: Headers

        The headers object to append the preload links to

      Returns void

      export default function handleRequest(
      request: Request,
      statusCode: number,
      headers: Headers,
      context: EntryContext
      ) {
      let markup = renderToString(
      <RemixServer context={context} url={request.url} />
      );
      headers.set("Content-Type", "text/html");

      preloadRouteAssets(context, headers); // add this line

      return new Response("<!DOCTYPE html>" + markup, {
      status: statusCode,
      headers: headers,
      });
      }