@modern-js/utils 2.30.1-alpha.0 → 2.31.0
Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md
CHANGED
@@ -94,7 +94,6 @@ const renderNestedRoute = (nestedRoute, options = {}) => {
|
|
94
94
|
} else {
|
95
95
|
var _parent1;
|
96
96
|
nestedRoute.loading = (_parent1 = parent) === null || _parent1 === void 0 ? void 0 : _parent1.loading;
|
97
|
-
routeProps.element = /* @__PURE__ */ (0, _jsxruntime.jsx)(_reactrouterdom.Outlet, {});
|
98
97
|
}
|
99
98
|
if (element) {
|
100
99
|
routeProps.element = element;
|
@@ -2,7 +2,7 @@ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
2
2
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
3
3
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
4
4
|
import { Suspense } from "react";
|
5
|
-
import { createRoutesFromElements,
|
5
|
+
import { createRoutesFromElements, Route } from "react-router-dom";
|
6
6
|
export var transformNestedRoutes = function(routes) {
|
7
7
|
var routeElements = [];
|
8
8
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
@@ -89,7 +89,6 @@ export var renderNestedRoute = function(nestedRoute) {
|
|
89
89
|
} else {
|
90
90
|
var _parent1;
|
91
91
|
nestedRoute.loading = (_parent1 = parent) === null || _parent1 === void 0 ? void 0 : _parent1.loading;
|
92
|
-
routeProps.element = /* @__PURE__ */ _jsx(Outlet, {});
|
93
92
|
}
|
94
93
|
if (element) {
|
95
94
|
routeProps.element = element;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
2
|
import { Suspense } from "react";
|
3
|
-
import { createRoutesFromElements,
|
3
|
+
import { createRoutesFromElements, Route } from "react-router-dom";
|
4
4
|
export const transformNestedRoutes = (routes) => {
|
5
5
|
const routeElements = [];
|
6
6
|
for (const route of routes) {
|
@@ -74,7 +74,6 @@ export const renderNestedRoute = (nestedRoute, options = {}) => {
|
|
74
74
|
} else {
|
75
75
|
var _parent1;
|
76
76
|
nestedRoute.loading = (_parent1 = parent) === null || _parent1 === void 0 ? void 0 : _parent1.loading;
|
77
|
-
routeProps.element = /* @__PURE__ */ _jsx(Outlet, {});
|
78
77
|
}
|
79
78
|
if (element) {
|
80
79
|
routeProps.element = element;
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.
|
18
|
+
"version": "2.31.0",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/types/index.d.ts",
|
21
21
|
"main": "./dist/cjs/index.js",
|
@@ -215,7 +215,7 @@
|
|
215
215
|
}
|
216
216
|
},
|
217
217
|
"dependencies": {
|
218
|
-
"caniuse-lite": "^1.0.
|
218
|
+
"caniuse-lite": "^1.0.30001520",
|
219
219
|
"lodash": "^4.17.21",
|
220
220
|
"serialize-javascript": "^6.0.0",
|
221
221
|
"react-router-dom": "6.11.1",
|
@@ -243,9 +243,9 @@
|
|
243
243
|
"typescript": "^5",
|
244
244
|
"webpack": "^5.88.1",
|
245
245
|
"@types/serialize-javascript": "^5.0.1",
|
246
|
-
"@modern-js/types": "2.
|
247
|
-
"@scripts/build": "2.
|
248
|
-
"@scripts/jest-config": "2.
|
246
|
+
"@modern-js/types": "2.31.0",
|
247
|
+
"@scripts/build": "2.31.0",
|
248
|
+
"@scripts/jest-config": "2.31.0"
|
249
249
|
},
|
250
250
|
"sideEffects": false,
|
251
251
|
"scripts": {
|