@modern-js/utils 2.30.0 → 2.30.1-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -94,6 +94,7 @@ 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, {});
97
98
  }
98
99
  if (element) {
99
100
  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, Route } from "react-router-dom";
5
+ import { createRoutesFromElements, Outlet, 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,6 +89,7 @@ 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, {});
92
93
  }
93
94
  if (element) {
94
95
  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, Route } from "react-router-dom";
3
+ import { createRoutesFromElements, Outlet, Route } from "react-router-dom";
4
4
  export const transformNestedRoutes = (routes) => {
5
5
  const routeElements = [];
6
6
  for (const route of routes) {
@@ -74,6 +74,7 @@ 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, {});
77
78
  }
78
79
  if (element) {
79
80
  routeProps.element = element;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.30.0",
18
+ "version": "2.30.1-alpha.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -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.30.0",
246
247
  "@scripts/build": "2.30.0",
247
- "@scripts/jest-config": "2.30.0",
248
- "@modern-js/types": "2.30.0"
248
+ "@scripts/jest-config": "2.30.0"
249
249
  },
250
250
  "sideEffects": false,
251
251
  "scripts": {