@modern-js/plugin-router-v5 2.52.0 → 2.54.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.
@@ -70,7 +70,7 @@ const routerPlugin = ({ serverBase = [], history: customHistory, supportHtml5His
|
|
70
70
|
context
|
71
71
|
});
|
72
72
|
},
|
73
|
-
hoc: ({ App }, next) => {
|
73
|
+
hoc: ({ App, config }, next) => {
|
74
74
|
const getRouteApp = () => {
|
75
75
|
if (isBrow) {
|
76
76
|
var _window__SERVER_DATA;
|
@@ -124,11 +124,13 @@ const routerPlugin = ({ serverBase = [], history: customHistory, supportHtml5His
|
|
124
124
|
}
|
125
125
|
if (routesConfig === null || routesConfig === void 0 ? void 0 : routesConfig.globalApp) {
|
126
126
|
return next({
|
127
|
-
App: (0, import_hoist_non_react_statics.default)(RouteApp, routesConfig.globalApp)
|
127
|
+
App: (0, import_hoist_non_react_statics.default)(RouteApp, routesConfig.globalApp),
|
128
|
+
config
|
128
129
|
});
|
129
130
|
}
|
130
131
|
return next({
|
131
|
-
App: RouteApp
|
132
|
+
App: RouteApp,
|
133
|
+
config
|
132
134
|
});
|
133
135
|
}
|
134
136
|
};
|
@@ -46,7 +46,7 @@ var routerPlugin = function(param) {
|
|
46
46
|
});
|
47
47
|
},
|
48
48
|
hoc: function(param2, next) {
|
49
|
-
var App = param2.App;
|
49
|
+
var App = param2.App, config = param2.config;
|
50
50
|
var getRouteApp = function() {
|
51
51
|
if (isBrow) {
|
52
52
|
var _window__SERVER_DATA;
|
@@ -96,11 +96,13 @@ var routerPlugin = function(param) {
|
|
96
96
|
}
|
97
97
|
if (routesConfig === null || routesConfig === void 0 ? void 0 : routesConfig.globalApp) {
|
98
98
|
return next({
|
99
|
-
App: hoistNonReactStatics(RouteApp, routesConfig.globalApp)
|
99
|
+
App: hoistNonReactStatics(RouteApp, routesConfig.globalApp),
|
100
|
+
config
|
100
101
|
});
|
101
102
|
}
|
102
103
|
return next({
|
103
|
-
App: RouteApp
|
104
|
+
App: RouteApp,
|
105
|
+
config
|
104
106
|
});
|
105
107
|
}
|
106
108
|
};
|
@@ -37,7 +37,7 @@ const routerPlugin = ({ serverBase = [], history: customHistory, supportHtml5His
|
|
37
37
|
context
|
38
38
|
});
|
39
39
|
},
|
40
|
-
hoc: ({ App }, next) => {
|
40
|
+
hoc: ({ App, config }, next) => {
|
41
41
|
const getRouteApp = () => {
|
42
42
|
if (isBrow) {
|
43
43
|
var _window__SERVER_DATA;
|
@@ -91,11 +91,13 @@ const routerPlugin = ({ serverBase = [], history: customHistory, supportHtml5His
|
|
91
91
|
}
|
92
92
|
if (routesConfig === null || routesConfig === void 0 ? void 0 : routesConfig.globalApp) {
|
93
93
|
return next({
|
94
|
-
App: hoistNonReactStatics(RouteApp, routesConfig.globalApp)
|
94
|
+
App: hoistNonReactStatics(RouteApp, routesConfig.globalApp),
|
95
|
+
config
|
95
96
|
});
|
96
97
|
}
|
97
98
|
return next({
|
98
|
-
App: RouteApp
|
99
|
+
App: RouteApp,
|
100
|
+
config
|
99
101
|
});
|
100
102
|
}
|
101
103
|
};
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.
|
18
|
+
"version": "2.54.0",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/types/cli/index.d.ts",
|
21
21
|
"main": "./dist/cjs/cli/index.js",
|
@@ -60,10 +60,10 @@
|
|
60
60
|
"hoist-non-react-statics": "^3.3.2",
|
61
61
|
"react-router-dom": "^5.3.4",
|
62
62
|
"@swc/helpers": "0.5.3",
|
63
|
-
"@modern-js/plugin": "2.
|
64
|
-
"@modern-js/
|
65
|
-
"@modern-js/runtime-utils": "2.
|
66
|
-
"@modern-js/
|
63
|
+
"@modern-js/plugin": "2.54.0",
|
64
|
+
"@modern-js/utils": "2.54.0",
|
65
|
+
"@modern-js/runtime-utils": "2.54.0",
|
66
|
+
"@modern-js/types": "2.54.0"
|
67
67
|
},
|
68
68
|
"peerDependencies": {
|
69
69
|
"react": ">=17",
|
@@ -79,11 +79,11 @@
|
|
79
79
|
"react-dom": "^18",
|
80
80
|
"ts-jest": "^29.1.0",
|
81
81
|
"typescript": "^5",
|
82
|
-
"@modern-js/app-tools": "2.
|
83
|
-
"@modern-js/core": "2.
|
84
|
-
"@modern-js/runtime": "2.
|
85
|
-
"@scripts/
|
86
|
-
"@scripts/
|
82
|
+
"@modern-js/app-tools": "2.54.0",
|
83
|
+
"@modern-js/core": "2.54.0",
|
84
|
+
"@modern-js/runtime": "2.54.0",
|
85
|
+
"@scripts/jest-config": "2.54.0",
|
86
|
+
"@scripts/build": "2.54.0"
|
87
87
|
},
|
88
88
|
"sideEffects": false,
|
89
89
|
"publishConfig": {
|