@modern-js/plugin-router-v5 2.4.1-beta.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{js/node → cjs}/cli/index.js +4 -21
- package/dist/{js/modern → cjs}/cli/types.js +0 -0
- package/dist/{js/node → cjs}/index.js +0 -0
- package/dist/{js/node → cjs}/runtime/DefaultNotFound.js +0 -0
- package/dist/{js/node → cjs}/runtime/index.js +0 -0
- package/dist/{js/node → cjs}/runtime/plugin.js +14 -23
- package/dist/{js/node → cjs}/runtime/utils.js +13 -35
- package/dist/{js/treeshaking → esm}/cli/index.js +0 -0
- package/dist/{js/treeshaking → esm}/cli/types.js +0 -0
- package/dist/{js/treeshaking → esm}/index.js +0 -0
- package/dist/{js/treeshaking → esm}/runtime/DefaultNotFound.js +0 -0
- package/dist/{js/treeshaking → esm}/runtime/index.js +0 -0
- package/dist/{js/treeshaking → esm}/runtime/plugin.js +8 -4
- package/dist/{js/treeshaking → esm}/runtime/utils.js +0 -0
- package/dist/{js/modern → esm-node}/cli/index.js +4 -23
- package/dist/{js/node → esm-node}/cli/types.js +0 -0
- package/dist/{js/modern → esm-node}/index.js +0 -0
- package/dist/{js/modern → esm-node}/runtime/DefaultNotFound.js +0 -0
- package/dist/{js/modern → esm-node}/runtime/index.js +0 -0
- package/dist/{js/modern → esm-node}/runtime/plugin.js +14 -25
- package/dist/{js/modern → esm-node}/runtime/utils.js +13 -37
- package/dist/types/runtime/plugin.d.ts +1 -1
- package/package.json +14 -15
@@ -1,24 +1,7 @@
|
|
1
1
|
var __defProp = Object.defineProperty;
|
2
|
-
var __defProps = Object.defineProperties;
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
5
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
7
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
9
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
10
|
-
var __spreadValues = (a, b) => {
|
11
|
-
for (var prop in b || (b = {}))
|
12
|
-
if (__hasOwnProp.call(b, prop))
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
14
|
-
if (__getOwnPropSymbols)
|
15
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
16
|
-
if (__propIsEnum.call(b, prop))
|
17
|
-
__defNormalProp(a, prop, b[prop]);
|
18
|
-
}
|
19
|
-
return a;
|
20
|
-
};
|
21
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
22
5
|
var __export = (target, all) => {
|
23
6
|
for (var name in all)
|
24
7
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -110,11 +93,11 @@ var cli_default = () => ({
|
|
110
93
|
const serverBase = serverRoutes.filter((route) => route.entryName === entryName).map((route) => route.urlPath).sort((a, b) => a.length - b.length > 0 ? -1 : 1);
|
111
94
|
plugins.push({
|
112
95
|
name: PLUGIN_IDENTIFIER,
|
113
|
-
options: JSON.stringify(
|
114
|
-
serverBase
|
115
|
-
|
96
|
+
options: JSON.stringify({
|
97
|
+
serverBase,
|
98
|
+
...runtimeConfig.router,
|
116
99
|
routesConfig: fileSystemRoutes ? `{ ${ROUTES_IDENTIFIER}, globalApp: App }` : void 0
|
117
|
-
})
|
100
|
+
}).replace(
|
118
101
|
/"routesConfig"\s*:\s*"((\S|\s)+)"/g,
|
119
102
|
'"routesConfig": $1,'
|
120
103
|
)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,26 +1,9 @@
|
|
1
1
|
var __create = Object.create;
|
2
2
|
var __defProp = Object.defineProperty;
|
3
|
-
var __defProps = Object.defineProperties;
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
6
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
8
5
|
var __getProtoOf = Object.getPrototypeOf;
|
9
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
12
|
-
var __spreadValues = (a, b) => {
|
13
|
-
for (var prop in b || (b = {}))
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
16
|
-
if (__getOwnPropSymbols)
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
18
|
-
if (__propIsEnum.call(b, prop))
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
20
|
-
}
|
21
|
-
return a;
|
22
|
-
};
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
24
7
|
var __export = (target, all) => {
|
25
8
|
for (var name in all)
|
26
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -80,9 +63,13 @@ const routerPlugin = ({
|
|
80
63
|
const history = customHistory || (supportHtml5History ? (0, import_history.createBrowserHistory)(historyOptions) : (0, import_history.createHashHistory)(historyOptions));
|
81
64
|
return (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_router_dom.Router, {
|
82
65
|
history,
|
83
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(App,
|
84
|
-
|
85
|
-
|
66
|
+
children: createRoutes ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(App, {
|
67
|
+
...props,
|
68
|
+
Component: createRoutes()
|
69
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(App, {
|
70
|
+
...props,
|
71
|
+
children: (0, import_utils.renderRoutes)(routesConfig, props)
|
72
|
+
})
|
86
73
|
});
|
87
74
|
}
|
88
75
|
return (props) => {
|
@@ -97,9 +84,13 @@ const routerPlugin = ({
|
|
97
84
|
basename: basename === "/" ? "" : basename,
|
98
85
|
location: location2,
|
99
86
|
context: routerContext,
|
100
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(App,
|
101
|
-
|
102
|
-
|
87
|
+
children: createRoutes ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(App, {
|
88
|
+
...props,
|
89
|
+
Component: createRoutes()
|
90
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(App, {
|
91
|
+
...props,
|
92
|
+
children: (0, import_utils.renderRoutes)(routesConfig, props)
|
93
|
+
})
|
103
94
|
});
|
104
95
|
};
|
105
96
|
};
|
@@ -1,33 +1,7 @@
|
|
1
1
|
var __defProp = Object.defineProperty;
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
8
|
-
var __spreadValues = (a, b) => {
|
9
|
-
for (var prop in b || (b = {}))
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
12
|
-
if (__getOwnPropSymbols)
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
14
|
-
if (__propIsEnum.call(b, prop))
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
16
|
-
}
|
17
|
-
return a;
|
18
|
-
};
|
19
|
-
var __objRest = (source, exclude) => {
|
20
|
-
var target = {};
|
21
|
-
for (var prop in source)
|
22
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
23
|
-
target[prop] = source[prop];
|
24
|
-
if (source != null && __getOwnPropSymbols)
|
25
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
26
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
27
|
-
target[prop] = source[prop];
|
28
|
-
}
|
29
|
-
return target;
|
30
|
-
};
|
31
5
|
var __export = (target, all) => {
|
32
6
|
for (var name in all)
|
33
7
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -56,15 +30,17 @@ function renderRoutes(routesConfig, extraProps = {}) {
|
|
56
30
|
if (!routesConfig) {
|
57
31
|
return null;
|
58
32
|
}
|
59
|
-
const Layout = (
|
60
|
-
var _b = _a, { Component } = _b, props = __objRest(_b, ["Component"]);
|
33
|
+
const Layout = ({ Component, ...props }) => {
|
61
34
|
const GlobalLayout = routesConfig == null ? void 0 : routesConfig.globalApp;
|
62
35
|
if (!GlobalLayout) {
|
63
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component,
|
36
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {
|
37
|
+
...props
|
38
|
+
});
|
64
39
|
}
|
65
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalLayout,
|
66
|
-
Component
|
67
|
-
|
40
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalLayout, {
|
41
|
+
Component,
|
42
|
+
...props
|
43
|
+
});
|
68
44
|
};
|
69
45
|
const findMatchedRoute = (pathname) => {
|
70
46
|
var _a;
|
@@ -88,9 +64,11 @@ function renderRoutes(routesConfig, extraProps = {}) {
|
|
88
64
|
path: matchedRoute.path,
|
89
65
|
exact: matchedRoute.exact,
|
90
66
|
sensitive: matchedRoute.sensitive,
|
91
|
-
render: (routeProps) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Layout,
|
92
|
-
Component: matchedRoute.component
|
93
|
-
|
67
|
+
render: (routeProps) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Layout, {
|
68
|
+
Component: matchedRoute.component,
|
69
|
+
...routeProps,
|
70
|
+
...extraProps
|
71
|
+
})
|
94
72
|
});
|
95
73
|
}
|
96
74
|
});
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -90,8 +90,10 @@ var routerPlugin = function(param) {
|
|
90
90
|
return function(props) {
|
91
91
|
return /* @__PURE__ */ jsx(Router, {
|
92
92
|
history: history,
|
93
|
-
children: /* @__PURE__ */ jsx(App, _objectSpreadProps(_objectSpread({}, props), {
|
94
|
-
|
93
|
+
children: createRoutes ? /* @__PURE__ */ jsx(App, _objectSpreadProps(_objectSpread({}, props), {
|
94
|
+
Component: createRoutes()
|
95
|
+
})) : /* @__PURE__ */ jsx(App, _objectSpreadProps(_objectSpread({}, props), {
|
96
|
+
children: renderRoutes(routesConfig, props)
|
95
97
|
}))
|
96
98
|
});
|
97
99
|
};
|
@@ -108,8 +110,10 @@ var routerPlugin = function(param) {
|
|
108
110
|
basename: basename === "/" ? "" : basename,
|
109
111
|
location: location2,
|
110
112
|
context: routerContext,
|
111
|
-
children: /* @__PURE__ */ jsx(App, _objectSpreadProps(_objectSpread({}, props), {
|
112
|
-
|
113
|
+
children: createRoutes ? /* @__PURE__ */ jsx(App, _objectSpreadProps(_objectSpread({}, props), {
|
114
|
+
Component: createRoutes()
|
115
|
+
})) : /* @__PURE__ */ jsx(App, _objectSpreadProps(_objectSpread({}, props), {
|
116
|
+
children: renderRoutes(routesConfig, props)
|
113
117
|
}))
|
114
118
|
});
|
115
119
|
};
|
File without changes
|
@@ -1,22 +1,3 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __defProps = Object.defineProperties;
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
8
|
-
var __spreadValues = (a, b) => {
|
9
|
-
for (var prop in b || (b = {}))
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
12
|
-
if (__getOwnPropSymbols)
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
14
|
-
if (__propIsEnum.call(b, prop))
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
16
|
-
}
|
17
|
-
return a;
|
18
|
-
};
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
20
1
|
import {
|
21
2
|
getEntryOptions,
|
22
3
|
createRuntimeExportsUtils,
|
@@ -94,11 +75,11 @@ var cli_default = () => ({
|
|
94
75
|
const serverBase = serverRoutes.filter((route) => route.entryName === entryName).map((route) => route.urlPath).sort((a, b) => a.length - b.length > 0 ? -1 : 1);
|
95
76
|
plugins.push({
|
96
77
|
name: PLUGIN_IDENTIFIER,
|
97
|
-
options: JSON.stringify(
|
98
|
-
serverBase
|
99
|
-
|
78
|
+
options: JSON.stringify({
|
79
|
+
serverBase,
|
80
|
+
...runtimeConfig.router,
|
100
81
|
routesConfig: fileSystemRoutes ? `{ ${ROUTES_IDENTIFIER}, globalApp: App }` : void 0
|
101
|
-
})
|
82
|
+
}).replace(
|
102
83
|
/"routesConfig"\s*:\s*"((\S|\s)+)"/g,
|
103
84
|
'"routesConfig": $1,'
|
104
85
|
)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,22 +1,3 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __defProps = Object.defineProperties;
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
8
|
-
var __spreadValues = (a, b) => {
|
9
|
-
for (var prop in b || (b = {}))
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
12
|
-
if (__getOwnPropSymbols)
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
14
|
-
if (__propIsEnum.call(b, prop))
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
16
|
-
}
|
17
|
-
return a;
|
18
|
-
};
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
20
1
|
import { jsx } from "react/jsx-runtime";
|
21
2
|
import { useContext } from "react";
|
22
3
|
import {
|
@@ -62,9 +43,13 @@ const routerPlugin = ({
|
|
62
43
|
const history = customHistory || (supportHtml5History ? createBrowserHistory(historyOptions) : createHashHistory(historyOptions));
|
63
44
|
return (props) => /* @__PURE__ */ jsx(Router, {
|
64
45
|
history,
|
65
|
-
children: /* @__PURE__ */ jsx(App,
|
66
|
-
|
67
|
-
|
46
|
+
children: createRoutes ? /* @__PURE__ */ jsx(App, {
|
47
|
+
...props,
|
48
|
+
Component: createRoutes()
|
49
|
+
}) : /* @__PURE__ */ jsx(App, {
|
50
|
+
...props,
|
51
|
+
children: renderRoutes(routesConfig, props)
|
52
|
+
})
|
68
53
|
});
|
69
54
|
}
|
70
55
|
return (props) => {
|
@@ -79,9 +64,13 @@ const routerPlugin = ({
|
|
79
64
|
basename: basename === "/" ? "" : basename,
|
80
65
|
location: location2,
|
81
66
|
context: routerContext,
|
82
|
-
children: /* @__PURE__ */ jsx(App,
|
83
|
-
|
84
|
-
|
67
|
+
children: createRoutes ? /* @__PURE__ */ jsx(App, {
|
68
|
+
...props,
|
69
|
+
Component: createRoutes()
|
70
|
+
}) : /* @__PURE__ */ jsx(App, {
|
71
|
+
...props,
|
72
|
+
children: renderRoutes(routesConfig, props)
|
73
|
+
})
|
85
74
|
});
|
86
75
|
};
|
87
76
|
};
|
@@ -1,31 +1,3 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
6
|
-
var __spreadValues = (a, b) => {
|
7
|
-
for (var prop in b || (b = {}))
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
10
|
-
if (__getOwnPropSymbols)
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
12
|
-
if (__propIsEnum.call(b, prop))
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
14
|
-
}
|
15
|
-
return a;
|
16
|
-
};
|
17
|
-
var __objRest = (source, exclude) => {
|
18
|
-
var target = {};
|
19
|
-
for (var prop in source)
|
20
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
21
|
-
target[prop] = source[prop];
|
22
|
-
if (source != null && __getOwnPropSymbols)
|
23
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
24
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
25
|
-
target[prop] = source[prop];
|
26
|
-
}
|
27
|
-
return target;
|
28
|
-
};
|
29
1
|
import { jsx } from "react/jsx-runtime";
|
30
2
|
import { Route, matchPath } from "react-router-dom";
|
31
3
|
import { DefaultNotFound } from "./DefaultNotFound";
|
@@ -33,15 +5,17 @@ function renderRoutes(routesConfig, extraProps = {}) {
|
|
33
5
|
if (!routesConfig) {
|
34
6
|
return null;
|
35
7
|
}
|
36
|
-
const Layout = (
|
37
|
-
var _b = _a, { Component } = _b, props = __objRest(_b, ["Component"]);
|
8
|
+
const Layout = ({ Component, ...props }) => {
|
38
9
|
const GlobalLayout = routesConfig == null ? void 0 : routesConfig.globalApp;
|
39
10
|
if (!GlobalLayout) {
|
40
|
-
return /* @__PURE__ */ jsx(Component,
|
11
|
+
return /* @__PURE__ */ jsx(Component, {
|
12
|
+
...props
|
13
|
+
});
|
41
14
|
}
|
42
|
-
return /* @__PURE__ */ jsx(GlobalLayout,
|
43
|
-
Component
|
44
|
-
|
15
|
+
return /* @__PURE__ */ jsx(GlobalLayout, {
|
16
|
+
Component,
|
17
|
+
...props
|
18
|
+
});
|
45
19
|
};
|
46
20
|
const findMatchedRoute = (pathname) => {
|
47
21
|
var _a;
|
@@ -65,9 +39,11 @@ function renderRoutes(routesConfig, extraProps = {}) {
|
|
65
39
|
path: matchedRoute.path,
|
66
40
|
exact: matchedRoute.exact,
|
67
41
|
sensitive: matchedRoute.sensitive,
|
68
|
-
render: (routeProps) => /* @__PURE__ */ jsx(Layout,
|
69
|
-
Component: matchedRoute.component
|
70
|
-
|
42
|
+
render: (routeProps) => /* @__PURE__ */ jsx(Layout, {
|
43
|
+
Component: matchedRoute.component,
|
44
|
+
...routeProps,
|
45
|
+
...extraProps
|
46
|
+
})
|
71
47
|
});
|
72
48
|
}
|
73
49
|
});
|
@@ -40,7 +40,7 @@ export type RouterConfig = Partial<HistoryConfig> & {
|
|
40
40
|
globalApp?: React.ComponentType<any>;
|
41
41
|
routes?: SingleRouteConfig[];
|
42
42
|
};
|
43
|
-
createRoutes?: () =>
|
43
|
+
createRoutes?: () => React.ComponentType<any> | null;
|
44
44
|
history?: History;
|
45
45
|
serverBase?: string[];
|
46
46
|
};
|
package/package.json
CHANGED
@@ -11,24 +11,23 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "2.
|
14
|
+
"version": "2.5.0",
|
15
15
|
"jsnext:source": "./src/index.ts",
|
16
16
|
"types": "./dist/types/cli/index.d.ts",
|
17
|
-
"main": "./dist/
|
18
|
-
"module": "./dist/
|
19
|
-
"jsnext:modern": "./dist/js/modern/cli/index.js",
|
17
|
+
"main": "./dist/cjs/cli/index.js",
|
18
|
+
"module": "./dist/esm/index.js",
|
20
19
|
"exports": {
|
21
20
|
".": {
|
22
21
|
"jsnext:source": "./src/cli/index.ts",
|
23
|
-
"default": "./dist/
|
22
|
+
"default": "./dist/cjs/cli/index.js"
|
24
23
|
},
|
25
24
|
"./runtime": {
|
26
25
|
"jsnext:source": "./src/runtime/index.ts",
|
27
|
-
"default": "./dist/
|
26
|
+
"default": "./dist/esm/runtime/index.js"
|
28
27
|
},
|
29
28
|
"./cli": {
|
30
29
|
"jsnext:source": "./src/cli/index.ts",
|
31
|
-
"default": "./dist/
|
30
|
+
"default": "./dist/cjs/cli/index.js"
|
32
31
|
}
|
33
32
|
},
|
34
33
|
"typesVersions": {
|
@@ -53,8 +52,8 @@
|
|
53
52
|
"hoist-non-react-statics": "^3.3.2",
|
54
53
|
"@types/history": "^4.7.9",
|
55
54
|
"@types/react-router-dom": "^5.1.8",
|
56
|
-
"@modern-js/utils": "2.
|
57
|
-
"@modern-js/types": "2.
|
55
|
+
"@modern-js/utils": "2.5.0",
|
56
|
+
"@modern-js/types": "2.5.0"
|
58
57
|
},
|
59
58
|
"peerDependencies": {
|
60
59
|
"react": ">=17",
|
@@ -73,12 +72,12 @@
|
|
73
72
|
"@testing-library/react": "^13.4.0",
|
74
73
|
"@testing-library/react-hooks": "^8.0.1",
|
75
74
|
"@types/invariant": "^2.2.30",
|
76
|
-
"@modern-js/runtime": "2.
|
77
|
-
"@modern-js/core": "2.
|
78
|
-
"@modern-js/utils": "2.
|
79
|
-
"@scripts/build": "2.
|
80
|
-
"@modern-js/app-tools": "
|
81
|
-
"@scripts/jest-config": "2.
|
75
|
+
"@modern-js/runtime": "2.5.0",
|
76
|
+
"@modern-js/core": "2.5.0",
|
77
|
+
"@modern-js/utils": "2.5.0",
|
78
|
+
"@scripts/build": "2.5.0",
|
79
|
+
"@modern-js/app-tools": "2.5.0",
|
80
|
+
"@scripts/jest-config": "2.5.0"
|
82
81
|
},
|
83
82
|
"sideEffects": false,
|
84
83
|
"modernConfig": {},
|