remix-utils
Advanced tools
Comparing version 5.2.0 to 5.2.1
@@ -55,1 +55,27 @@ import { EntryContext } from "@remix-run/server-runtime"; | ||
export declare function preloadLinkedAssets(context: EntryContext, headers: Headers): void; | ||
/** | ||
* Add Link headers to preload the JS modules in the route matching the current | ||
* request. | ||
* @param context Remix's EntryContext | ||
* @param headers The headers object to append the preload links to | ||
* @example | ||
* 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"); | ||
* | ||
* preloadModuleAssets(context, headers); // add this line | ||
* | ||
* return new Response("<!DOCTYPE html>" + markup, { | ||
* status: statusCode, | ||
* headers: headers, | ||
* }); | ||
* } | ||
*/ | ||
export declare function preloadModuleAssets(context: EntryContext, headers: Headers): void; |
@@ -107,3 +107,3 @@ /** | ||
*/ | ||
function preloadModuleAssets(context, headers) { | ||
export function preloadModuleAssets(context, headers) { | ||
var _a; | ||
@@ -110,0 +110,0 @@ let urls = [ |
@@ -55,1 +55,27 @@ import { EntryContext } from "@remix-run/server-runtime"; | ||
export declare function preloadLinkedAssets(context: EntryContext, headers: Headers): void; | ||
/** | ||
* Add Link headers to preload the JS modules in the route matching the current | ||
* request. | ||
* @param context Remix's EntryContext | ||
* @param headers The headers object to append the preload links to | ||
* @example | ||
* 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"); | ||
* | ||
* preloadModuleAssets(context, headers); // add this line | ||
* | ||
* return new Response("<!DOCTYPE html>" + markup, { | ||
* status: statusCode, | ||
* headers: headers, | ||
* }); | ||
* } | ||
*/ | ||
export declare function preloadModuleAssets(context: EntryContext, headers: Headers): void; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.preloadLinkedAssets = exports.preloadRouteAssets = void 0; | ||
exports.preloadModuleAssets = exports.preloadLinkedAssets = exports.preloadRouteAssets = void 0; | ||
/** | ||
@@ -126,1 +126,2 @@ * Combine `preloadLinkedAssets` and `preloadModuleAssets` into a single | ||
} | ||
exports.preloadModuleAssets = preloadModuleAssets; |
{ | ||
"name": "remix-utils", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
232036
5073