Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remix-utils

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remix-utils - npm Package Compare versions

Comparing version 5.2.0 to 5.2.1

26

browser/server/preload-route-assets.d.ts

@@ -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;

2

browser/server/preload-route-assets.js

@@ -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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc