@modern-js/plugin-router-v5 2.56.0 → 2.56.2
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/cjs/cli/index.js
CHANGED
@@ -61,7 +61,9 @@ const routerPlugin = () => ({
|
|
61
61
|
return {
|
62
62
|
source: {
|
63
63
|
alias: {
|
64
|
-
[`@${metaName}/runtime/router-v5`]: routerExportsUtils.getPath()
|
64
|
+
[`@${metaName}/runtime/router-v5`]: routerExportsUtils.getPath(),
|
65
|
+
"@meta/runtime/context": "@modern-js/runtime/context",
|
66
|
+
"@meta/runtime": "@modern-js/runtime"
|
65
67
|
}
|
66
68
|
}
|
67
69
|
};
|
@@ -25,9 +25,9 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_react = require("react");
|
26
26
|
var import_history = require("history");
|
27
27
|
var import_react_router_dom = require("react-router-dom");
|
28
|
-
var import_runtime = require("@
|
28
|
+
var import_runtime = require("@meta/runtime");
|
29
29
|
var import_parsed = require("@modern-js/runtime-utils/parsed");
|
30
|
-
var import_context = require("@
|
30
|
+
var import_context = require("@meta/runtime/context");
|
31
31
|
var import_utils = require("./utils");
|
32
32
|
var import_hooks = require("./hooks");
|
33
33
|
const routerPlugin = ({ serverBase = [], history: customHistory, supportHtml5History = true, routesConfig, createRoutes, historyOptions = {} }) => {
|
package/dist/esm/cli/index.js
CHANGED
@@ -44,9 +44,10 @@ var routerPlugin = function() {
|
|
44
44
|
config: function config() {
|
45
45
|
var _api_useAppContext = api.useAppContext(), internalDirectory = _api_useAppContext.internalDirectory, metaName = _api_useAppContext.metaName;
|
46
46
|
routerExportsUtils = createRuntimeExportsUtils(internalDirectory, "router");
|
47
|
+
var _obj;
|
47
48
|
return {
|
48
49
|
source: {
|
49
|
-
alias:
|
50
|
+
alias: (_obj = {}, _define_property(_obj, "@".concat(metaName, "/runtime/router-v5"), routerExportsUtils.getPath()), _define_property(_obj, "@meta/runtime/context", "@modern-js/runtime/context"), _define_property(_obj, "@meta/runtime", "@modern-js/runtime"), _obj)
|
50
51
|
}
|
51
52
|
};
|
52
53
|
},
|
@@ -3,9 +3,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useContext } from "react";
|
4
4
|
import { createBrowserHistory, createHashHistory } from "history";
|
5
5
|
import { Router, StaticRouter, useRouteMatch, useLocation, useHistory } from "react-router-dom";
|
6
|
-
import { RuntimeReactContext, isBrowser } from "@
|
6
|
+
import { RuntimeReactContext, isBrowser } from "@meta/runtime";
|
7
7
|
import { parsedJSONFromElement } from "@modern-js/runtime-utils/parsed";
|
8
|
-
import { getGlobalLayoutApp, getGlobalRoutes } from "@
|
8
|
+
import { getGlobalLayoutApp, getGlobalRoutes } from "@meta/runtime/context";
|
9
9
|
import { renderRoutes, getLocation, urlJoin } from "./utils";
|
10
10
|
import { modifyRoutesHook } from "./hooks";
|
11
11
|
var routerPlugin = function(param) {
|
@@ -37,7 +37,9 @@ const routerPlugin = () => ({
|
|
37
37
|
return {
|
38
38
|
source: {
|
39
39
|
alias: {
|
40
|
-
[`@${metaName}/runtime/router-v5`]: routerExportsUtils.getPath()
|
40
|
+
[`@${metaName}/runtime/router-v5`]: routerExportsUtils.getPath(),
|
41
|
+
"@meta/runtime/context": "@modern-js/runtime/context",
|
42
|
+
"@meta/runtime": "@modern-js/runtime"
|
41
43
|
}
|
42
44
|
}
|
43
45
|
};
|
@@ -2,9 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useContext } from "react";
|
3
3
|
import { createBrowserHistory, createHashHistory } from "history";
|
4
4
|
import { Router, StaticRouter, useRouteMatch, useLocation, useHistory } from "react-router-dom";
|
5
|
-
import { RuntimeReactContext, isBrowser } from "@
|
5
|
+
import { RuntimeReactContext, isBrowser } from "@meta/runtime";
|
6
6
|
import { parsedJSONFromElement } from "@modern-js/runtime-utils/parsed";
|
7
|
-
import { getGlobalLayoutApp, getGlobalRoutes } from "@
|
7
|
+
import { getGlobalLayoutApp, getGlobalRoutes } from "@meta/runtime/context";
|
8
8
|
import { renderRoutes, getLocation, urlJoin } from "./utils";
|
9
9
|
import { modifyRoutesHook } from "./hooks";
|
10
10
|
const routerPlugin = ({ serverBase = [], history: customHistory, supportHtml5History = true, routesConfig, createRoutes, historyOptions = {} }) => {
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.56.
|
18
|
+
"version": "2.56.2",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/types/cli/index.d.ts",
|
21
21
|
"main": "./dist/cjs/cli/index.js",
|
@@ -59,15 +59,15 @@
|
|
59
59
|
"history": "^4.7.9",
|
60
60
|
"react-router-dom": "^5.3.4",
|
61
61
|
"@swc/helpers": "0.5.3",
|
62
|
-
"@modern-js/plugin": "2.56.
|
63
|
-
"@modern-js/
|
64
|
-
"@modern-js/utils": "2.56.
|
65
|
-
"@modern-js/
|
62
|
+
"@modern-js/plugin": "2.56.2",
|
63
|
+
"@modern-js/types": "2.56.2",
|
64
|
+
"@modern-js/utils": "2.56.2",
|
65
|
+
"@modern-js/runtime-utils": "2.56.2"
|
66
66
|
},
|
67
67
|
"peerDependencies": {
|
68
68
|
"react": ">=17",
|
69
69
|
"react-dom": ">=17",
|
70
|
-
"@modern-js/runtime": "^2.56.
|
70
|
+
"@modern-js/runtime": "^2.56.2"
|
71
71
|
},
|
72
72
|
"devDependencies": {
|
73
73
|
"@testing-library/react": "^13.4.0",
|
@@ -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.56.
|
83
|
-
"@modern-js/core": "2.56.
|
84
|
-
"@modern-js/runtime": "2.56.
|
85
|
-
"@scripts/build": "2.56.
|
86
|
-
"@scripts/jest-config": "2.56.
|
82
|
+
"@modern-js/app-tools": "2.56.2",
|
83
|
+
"@modern-js/core": "2.56.2",
|
84
|
+
"@modern-js/runtime": "2.56.2",
|
85
|
+
"@scripts/build": "2.56.2",
|
86
|
+
"@scripts/jest-config": "2.56.2"
|
87
87
|
},
|
88
88
|
"sideEffects": false,
|
89
89
|
"publishConfig": {
|