@modern-js/plugin-router-v5 2.60.5 → 2.60.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -71,8 +71,8 @@ const routerPlugin = (userConfig = {}) => {
71
71
  return (props) => {
72
72
  var _window__SERVER_DATA;
73
73
  const runtimeContext = (0, import_react.useContext)(import_runtime.RuntimeReactContext);
74
- const baseUrl = (runtimeContext._internalRouterBaseName || ((_window__SERVER_DATA = window._SERVER_DATA) === null || _window__SERVER_DATA === void 0 ? void 0 : _window__SERVER_DATA.router.baseUrl) || select(location.pathname)).replace(/^\/*/, "/");
75
- const basename = baseUrl === "/" ? (0, import_utils.urlJoin)(baseUrl, historyOptions.basename) : baseUrl;
74
+ const baseUrl = (((_window__SERVER_DATA = window._SERVER_DATA) === null || _window__SERVER_DATA === void 0 ? void 0 : _window__SERVER_DATA.router.baseUrl) || select(location.pathname)).replace(/^\/*/, "/");
75
+ const basename = baseUrl === "/" ? (0, import_utils.urlJoin)(baseUrl, runtimeContext._internalRouterBaseName || historyOptions.basename) : baseUrl;
76
76
  historyOptions.basename = basename;
77
77
  const history = customHistory || (supportHtml5History ? (0, import_history.createBrowserHistory)(historyOptions) : (0, import_history.createHashHistory)(historyOptions));
78
78
  const runner = api.useHookRunners();
@@ -53,8 +53,8 @@ var routerPlugin = function() {
53
53
  return function(props) {
54
54
  var _window__SERVER_DATA;
55
55
  var runtimeContext = useContext(RuntimeReactContext);
56
- var baseUrl = (runtimeContext._internalRouterBaseName || ((_window__SERVER_DATA = window._SERVER_DATA) === null || _window__SERVER_DATA === void 0 ? void 0 : _window__SERVER_DATA.router.baseUrl) || select(location.pathname)).replace(/^\/*/, "/");
57
- var basename = baseUrl === "/" ? urlJoin(baseUrl, historyOptions.basename) : baseUrl;
56
+ var baseUrl = (((_window__SERVER_DATA = window._SERVER_DATA) === null || _window__SERVER_DATA === void 0 ? void 0 : _window__SERVER_DATA.router.baseUrl) || select(location.pathname)).replace(/^\/*/, "/");
57
+ var basename = baseUrl === "/" ? urlJoin(baseUrl, runtimeContext._internalRouterBaseName || historyOptions.basename) : baseUrl;
58
58
  historyOptions.basename = basename;
59
59
  var history = customHistory || (supportHtml5History ? createBrowserHistory(historyOptions) : createHashHistory(historyOptions));
60
60
  var runner = api.useHookRunners();
@@ -48,8 +48,8 @@ const routerPlugin = (userConfig = {}) => {
48
48
  return (props) => {
49
49
  var _window__SERVER_DATA;
50
50
  const runtimeContext = useContext(RuntimeReactContext);
51
- const baseUrl = (runtimeContext._internalRouterBaseName || ((_window__SERVER_DATA = window._SERVER_DATA) === null || _window__SERVER_DATA === void 0 ? void 0 : _window__SERVER_DATA.router.baseUrl) || select(location.pathname)).replace(/^\/*/, "/");
52
- const basename = baseUrl === "/" ? urlJoin(baseUrl, historyOptions.basename) : baseUrl;
51
+ const baseUrl = (((_window__SERVER_DATA = window._SERVER_DATA) === null || _window__SERVER_DATA === void 0 ? void 0 : _window__SERVER_DATA.router.baseUrl) || select(location.pathname)).replace(/^\/*/, "/");
52
+ const basename = baseUrl === "/" ? urlJoin(baseUrl, runtimeContext._internalRouterBaseName || historyOptions.basename) : baseUrl;
53
53
  historyOptions.basename = basename;
54
54
  const history = customHistory || (supportHtml5History ? createBrowserHistory(historyOptions) : createHashHistory(historyOptions));
55
55
  const runner = api.useHookRunners();
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.60.5",
18
+ "version": "2.60.6",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/cli/index.d.ts",
21
21
  "main": "./dist/cjs/cli/index.js",
@@ -59,15 +59,15 @@
59
59
  "@types/react-router-dom": "^5.1.8",
60
60
  "history": "^4.7.9",
61
61
  "react-router-dom": "^5.3.4",
62
- "@modern-js/plugin": "2.60.5",
63
- "@modern-js/runtime-utils": "2.60.5",
64
- "@modern-js/types": "2.60.5",
65
- "@modern-js/utils": "2.60.5"
62
+ "@modern-js/plugin": "2.60.6",
63
+ "@modern-js/runtime-utils": "2.60.6",
64
+ "@modern-js/types": "2.60.6",
65
+ "@modern-js/utils": "2.60.6"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "react": ">=17",
69
69
  "react-dom": ">=17",
70
- "@modern-js/runtime": "^2.60.5"
70
+ "@modern-js/runtime": "^2.60.6"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@testing-library/react": "^13.4.0",
@@ -79,11 +79,11 @@
79
79
  "react-dom": "^18.3.1",
80
80
  "ts-jest": "^29.1.0",
81
81
  "typescript": "^5",
82
- "@modern-js/app-tools": "2.60.5",
83
- "@modern-js/core": "2.60.5",
84
- "@modern-js/runtime": "2.60.5",
85
- "@scripts/build": "2.60.5",
86
- "@scripts/jest-config": "2.60.5"
82
+ "@modern-js/app-tools": "2.60.6",
83
+ "@modern-js/core": "2.60.6",
84
+ "@modern-js/runtime": "2.60.6",
85
+ "@scripts/build": "2.60.6",
86
+ "@scripts/jest-config": "2.60.6"
87
87
  },
88
88
  "sideEffects": false,
89
89
  "publishConfig": {