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

@umijs/renderer-react

Package Overview
Dependencies
Maintainers
10
Versions
656
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@umijs/renderer-react - npm Package Compare versions

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

10

dist/server.js

@@ -20,3 +20,3 @@ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";

case 0:
basename = '/';
basename = opts.basename || '/';
components = _objectSpread({}, opts.routeComponents); // todo 参数对齐

@@ -34,3 +34,9 @@ clientRoutes = createClientRoutes({

});
rootContainer = /*#__PURE__*/React.createElement(StaticRouter, {
rootContainer =
/*#__PURE__*/
// 这里的 location 需要包含 basename, 否则会影响 StaticRouter 的匹配.
// 由于 getClientRootComponent 方法会同时用于 ssr 和 ssg, 所以在调用该方法时需要注意传入的 location 是否包含 basename.
// 1. 在用于 ssr 时传入的 location 来源于 request.url, 它是包含 basename 的, 所以没有问题.
// 2. 但是在用于 ssg 时(static export), 需要注意传入的 locaiton 要拼接上 basename.
React.createElement(StaticRouter, {
basename: basename,

@@ -37,0 +43,0 @@ location: opts.location

1

dist/types.d.ts

@@ -67,2 +67,3 @@ /// <reference types="react" />

manifest: any;
basename?: string;
}

@@ -69,0 +70,0 @@ export interface IHtmlProps extends IHtmlHydrateOptions {

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

@@ -5,0 +5,0 @@ "homepage": "https://github.com/umijs/umi/tree/master/packages/renderer-react#readme",

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