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

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @modern-js/utils
2
2
 
3
+ ## 2.30.0
4
+
3
5
  ## 2.29.0
4
6
 
5
7
  ### Minor Changes
@@ -160,6 +160,10 @@ const CHAIN_ID = {
160
160
  HTML_PRECONNECT: "html-preconnect-plugin",
161
161
  /** htmlDnsPrefetchPlugin */
162
162
  HTML_DNS_PREFETCH: "html-dns-prefetch-plugin",
163
+ /** htmlPrefetchPlugin */
164
+ HTML_PREFETCH: "html-prefetch-plugin",
165
+ /** htmlPreloadPlugin */
166
+ HTML_PRELOAD: "html-preload-plugin",
163
167
  /** MiniCssExtractPlugin */
164
168
  MINI_CSS_EXTRACT: "mini-css-extract",
165
169
  /** VueLoaderPlugin */
@@ -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;
@@ -150,6 +150,10 @@ export var CHAIN_ID = {
150
150
  HTML_PRECONNECT: "html-preconnect-plugin",
151
151
  /** htmlDnsPrefetchPlugin */
152
152
  HTML_DNS_PREFETCH: "html-dns-prefetch-plugin",
153
+ /** htmlPrefetchPlugin */
154
+ HTML_PREFETCH: "html-prefetch-plugin",
155
+ /** htmlPreloadPlugin */
156
+ HTML_PRELOAD: "html-preload-plugin",
153
157
  /** MiniCssExtractPlugin */
154
158
  MINI_CSS_EXTRACT: "mini-css-extract",
155
159
  /** VueLoaderPlugin */
@@ -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;
@@ -150,6 +150,10 @@ export const CHAIN_ID = {
150
150
  HTML_PRECONNECT: "html-preconnect-plugin",
151
151
  /** htmlDnsPrefetchPlugin */
152
152
  HTML_DNS_PREFETCH: "html-dns-prefetch-plugin",
153
+ /** htmlPrefetchPlugin */
154
+ HTML_PREFETCH: "html-prefetch-plugin",
155
+ /** htmlPreloadPlugin */
156
+ HTML_PRELOAD: "html-preload-plugin",
153
157
  /** MiniCssExtractPlugin */
154
158
  MINI_CSS_EXTRACT: "mini-css-extract",
155
159
  /** VueLoaderPlugin */
@@ -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;
@@ -150,6 +150,10 @@ export declare const CHAIN_ID: {
150
150
  readonly HTML_PRECONNECT: "html-preconnect-plugin";
151
151
  /** htmlDnsPrefetchPlugin */
152
152
  readonly HTML_DNS_PREFETCH: "html-dns-prefetch-plugin";
153
+ /** htmlPrefetchPlugin */
154
+ readonly HTML_PREFETCH: "html-prefetch-plugin";
155
+ /** htmlPreloadPlugin */
156
+ readonly HTML_PRELOAD: "html-preload-plugin";
153
157
  /** MiniCssExtractPlugin */
154
158
  readonly MINI_CSS_EXTRACT: "mini-css-extract";
155
159
  /** VueLoaderPlugin */
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.29.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.29.0",
247
- "@scripts/build": "2.29.0",
248
- "@scripts/jest-config": "2.29.0"
246
+ "@modern-js/types": "2.30.0",
247
+ "@scripts/build": "2.30.0",
248
+ "@scripts/jest-config": "2.30.0"
249
249
  },
250
250
  "sideEffects": false,
251
251
  "scripts": {