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

@umijs/server

Package Overview
Dependencies
Maintainers
10
Versions
650
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@umijs/server - npm Package Compare versions

Comparing version 4.0.0-canary.20240903.3 to 4.0.0-canary.20240909.1

1

dist/ssr.d.ts

@@ -35,2 +35,3 @@ /// <reference lib="webworker" />

mountElementId: string;
basename?: string;
}

@@ -37,0 +38,0 @@ export declare function createMarkupGenerator(opts: CreateRequestHandlerOptions): (url: string) => Promise<unknown>;

13

dist/ssr.js

@@ -75,3 +75,4 @@ var __create = Object.create;

createHistory,
sourceDir
sourceDir,
basename
} = opts;

@@ -88,3 +89,3 @@ createHistory({ type: "memory", initialEntries: [url], initialIndex: 1 });

});
const matches = matchRoutesForSSR(url, routes);
const matches = matchRoutesForSSR(url, routes, basename);
if (matches.length === 0) {

@@ -131,3 +132,4 @@ return;

__INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: opts.__INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
mountElementId: opts.mountElementId
mountElementId: opts.mountElementId,
basename
};

@@ -459,5 +461,6 @@ const element = await opts.getClientRootComponent(

}
function matchRoutesForSSR(reqUrl, routesById) {
function matchRoutesForSSR(reqUrl, routesById, basename) {
var _a;
return ((_a = (0, import_react_router_dom.matchRoutes)(createClientRoutes({ routesById }), reqUrl)) == null ? void 0 : _a.map(
const _basename = (basename == null ? void 0 : basename.endsWith("/")) ? basename.slice(0, -1) : basename;
return ((_a = (0, import_react_router_dom.matchRoutes)(createClientRoutes({ routesById }), reqUrl, _basename)) == null ? void 0 : _a.map(
(route) => route.route.id

@@ -464,0 +467,0 @@ )) || [];

{
"name": "@umijs/server",
"version": "4.0.0-canary.20240903.3",
"version": "4.0.0-canary.20240909.1",
"description": "@umijs/server",

@@ -22,3 +22,3 @@ "homepage": "https://github.com/umijs/umi/tree/master/packages/server#readme",

"react-router-dom": "6.3.0",
"@umijs/bundler-utils": "4.0.0-canary.20240903.3"
"@umijs/bundler-utils": "4.0.0-canary.20240909.1"
},

@@ -25,0 +25,0 @@ "publishConfig": {

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