@modern-js/plugin-router-v5 2.58.2 → 2.58.3
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.
@@ -22,15 +22,15 @@ __export(plugin_exports, {
|
|
22
22
|
});
|
23
23
|
module.exports = __toCommonJS(plugin_exports);
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
25
|
-
var import_react = require("react");
|
26
|
-
var import_history = require("history");
|
27
|
-
var import_react_router_dom = require("react-router-dom");
|
28
25
|
var import_runtime = require("@meta/runtime");
|
29
|
-
var import_parsed = require("@modern-js/runtime-utils/parsed");
|
30
26
|
var import_context = require("@meta/runtime/context");
|
31
27
|
var import_merge = require("@modern-js/runtime-utils/merge");
|
32
|
-
var
|
28
|
+
var import_parsed = require("@modern-js/runtime-utils/parsed");
|
29
|
+
var import_history = require("history");
|
30
|
+
var import_react = require("react");
|
31
|
+
var import_react_router_dom = require("react-router-dom");
|
33
32
|
var import_hooks = require("./hooks");
|
33
|
+
var import_utils = require("./utils");
|
34
34
|
let routes = [];
|
35
35
|
const routerPlugin = (userConfig = {}) => {
|
36
36
|
return {
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
3
|
-
import { useContext } from "react";
|
4
|
-
import { createBrowserHistory, createHashHistory } from "history";
|
5
|
-
import { Router, StaticRouter, useRouteMatch, useLocation, useHistory } from "react-router-dom";
|
6
3
|
import { RuntimeReactContext, isBrowser } from "@meta/runtime";
|
7
|
-
import { parsedJSONFromElement } from "@modern-js/runtime-utils/parsed";
|
8
4
|
import { getGlobalLayoutApp, getGlobalRoutes } from "@meta/runtime/context";
|
9
5
|
import { merge } from "@modern-js/runtime-utils/merge";
|
10
|
-
import {
|
6
|
+
import { parsedJSONFromElement } from "@modern-js/runtime-utils/parsed";
|
7
|
+
import { createBrowserHistory, createHashHistory } from "history";
|
8
|
+
import { useContext } from "react";
|
9
|
+
import { Router, StaticRouter, useHistory, useLocation, useRouteMatch } from "react-router-dom";
|
11
10
|
import { modifyRoutesHook } from "./hooks";
|
11
|
+
import { getLocation, renderRoutes, urlJoin } from "./utils";
|
12
12
|
var routes = [];
|
13
13
|
var routerPlugin = function() {
|
14
14
|
var userConfig = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { useContext } from "react";
|
3
|
-
import { createBrowserHistory, createHashHistory } from "history";
|
4
|
-
import { Router, StaticRouter, useRouteMatch, useLocation, useHistory } from "react-router-dom";
|
5
2
|
import { RuntimeReactContext, isBrowser } from "@meta/runtime";
|
6
|
-
import { parsedJSONFromElement } from "@modern-js/runtime-utils/parsed";
|
7
3
|
import { getGlobalLayoutApp, getGlobalRoutes } from "@meta/runtime/context";
|
8
4
|
import { merge } from "@modern-js/runtime-utils/merge";
|
9
|
-
import {
|
5
|
+
import { parsedJSONFromElement } from "@modern-js/runtime-utils/parsed";
|
6
|
+
import { createBrowserHistory, createHashHistory } from "history";
|
7
|
+
import { useContext } from "react";
|
8
|
+
import { Router, StaticRouter, useHistory, useLocation, useRouteMatch } from "react-router-dom";
|
10
9
|
import { modifyRoutesHook } from "./hooks";
|
10
|
+
import { getLocation, renderRoutes, urlJoin } from "./utils";
|
11
11
|
let routes = [];
|
12
12
|
const routerPlugin = (userConfig = {}) => {
|
13
13
|
return {
|
@@ -1,7 +1,7 @@
|
|
1
|
+
import type { Plugin } from '@modern-js/runtime';
|
2
|
+
import { type BrowserHistoryBuildOptions, type HashHistoryBuildOptions, type History } from 'history';
|
1
3
|
import type React from 'react';
|
2
|
-
import { type History, type BrowserHistoryBuildOptions, type HashHistoryBuildOptions } from 'history';
|
3
4
|
import { type RouteProps } from 'react-router-dom';
|
4
|
-
import type { Plugin } from '@modern-js/runtime';
|
5
5
|
declare global {
|
6
6
|
interface Window {
|
7
7
|
_SERVER_DATA?: {
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.58.
|
18
|
+
"version": "2.58.3",
|
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
|
"@types/react-router-dom": "^5.1.8",
|
60
60
|
"history": "^4.7.9",
|
61
61
|
"react-router-dom": "^5.3.4",
|
62
|
-
"@modern-js/plugin": "2.58.
|
63
|
-
"@modern-js/
|
64
|
-
"@modern-js/
|
65
|
-
"@modern-js/utils": "2.58.
|
62
|
+
"@modern-js/plugin": "2.58.3",
|
63
|
+
"@modern-js/types": "2.58.3",
|
64
|
+
"@modern-js/runtime-utils": "2.58.3",
|
65
|
+
"@modern-js/utils": "2.58.3"
|
66
66
|
},
|
67
67
|
"peerDependencies": {
|
68
68
|
"react": ">=17",
|
69
69
|
"react-dom": ">=17",
|
70
|
-
"@modern-js/runtime": "^2.58.
|
70
|
+
"@modern-js/runtime": "^2.58.3"
|
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.58.
|
83
|
-
"@modern-js/core": "2.58.
|
84
|
-
"@
|
85
|
-
"@
|
86
|
-
"@scripts/jest-config": "2.58.
|
82
|
+
"@modern-js/app-tools": "2.58.3",
|
83
|
+
"@modern-js/core": "2.58.3",
|
84
|
+
"@modern-js/runtime": "2.58.3",
|
85
|
+
"@scripts/build": "2.58.3",
|
86
|
+
"@scripts/jest-config": "2.58.3"
|
87
87
|
},
|
88
88
|
"sideEffects": false,
|
89
89
|
"publishConfig": {
|