@modern-js/runtime 2.68.17 → 2.68.19
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.
|
@@ -42,7 +42,7 @@ var import_entry = require("./entry");
|
|
|
42
42
|
var import_handler = require("./handler");
|
|
43
43
|
var import_entry2 = require("./entry");
|
|
44
44
|
var import_handler2 = require("./handler");
|
|
45
|
-
const routerPlugin = () => ({
|
|
45
|
+
const routerPlugin = (options) => ({
|
|
46
46
|
name: "@modern-js/plugin-router",
|
|
47
47
|
required: [
|
|
48
48
|
"@modern-js/runtime"
|
|
@@ -59,7 +59,7 @@ const routerPlugin = () => ({
|
|
|
59
59
|
const serverBase = serverRoutes.filter((route) => route.entryName === entrypoint.entryName).map((route) => route.urlPath).sort((a, b) => a.length - b.length > 0 ? -1 : 1);
|
|
60
60
|
const userConfig = api.getNormalizedConfig();
|
|
61
61
|
const routerConfig = (_getEntryOptions = (0, import_utils.getEntryOptions)(entrypoint.entryName, entrypoint.isMainEntry, userConfig.runtime, userConfig.runtimeByEntries, packageName)) === null || _getEntryOptions === void 0 ? void 0 : _getEntryOptions.router;
|
|
62
|
-
if ((nestedRoutesEntry || pageRoutesEntry) && !isRouterV5) {
|
|
62
|
+
if ((nestedRoutesEntry || pageRoutesEntry) && !isRouterV5 && !(options === null || options === void 0 ? void 0 : options.disableRegisterRuntimePlugin)) {
|
|
63
63
|
plugins.push({
|
|
64
64
|
name: "router",
|
|
65
65
|
path: `@${metaName2}/runtime/router/internal`,
|
|
@@ -9,7 +9,7 @@ import { isRouteEntry } from "./entry";
|
|
|
9
9
|
import { handleFileChange, handleGeneratorEntryCode, handleModifyEntrypoints } from "./handler";
|
|
10
10
|
import { isRouteEntry as isRouteEntry2 } from "./entry";
|
|
11
11
|
import { handleFileChange as handleFileChange2, handleModifyEntrypoints as handleModifyEntrypoints2 } from "./handler";
|
|
12
|
-
var routerPlugin = function() {
|
|
12
|
+
var routerPlugin = function(options) {
|
|
13
13
|
return {
|
|
14
14
|
name: "@modern-js/plugin-router",
|
|
15
15
|
required: [
|
|
@@ -34,7 +34,7 @@ var routerPlugin = function() {
|
|
|
34
34
|
});
|
|
35
35
|
var userConfig = api.getNormalizedConfig();
|
|
36
36
|
var routerConfig = (_getEntryOptions = getEntryOptions(entrypoint.entryName, entrypoint.isMainEntry, userConfig.runtime, userConfig.runtimeByEntries, packageName)) === null || _getEntryOptions === void 0 ? void 0 : _getEntryOptions.router;
|
|
37
|
-
if ((nestedRoutesEntry || pageRoutesEntry) && !isRouterV5) {
|
|
37
|
+
if ((nestedRoutesEntry || pageRoutesEntry) && !isRouterV5 && !(options === null || options === void 0 ? void 0 : options.disableRegisterRuntimePlugin)) {
|
|
38
38
|
plugins.push({
|
|
39
39
|
name: "router",
|
|
40
40
|
path: "@".concat(metaName2, "/runtime/router/internal"),
|
|
@@ -5,7 +5,7 @@ import { isRouteEntry } from "./entry";
|
|
|
5
5
|
import { handleFileChange, handleGeneratorEntryCode, handleModifyEntrypoints } from "./handler";
|
|
6
6
|
import { isRouteEntry as isRouteEntry2 } from "./entry";
|
|
7
7
|
import { handleFileChange as handleFileChange2, handleModifyEntrypoints as handleModifyEntrypoints2 } from "./handler";
|
|
8
|
-
const routerPlugin = () => ({
|
|
8
|
+
const routerPlugin = (options) => ({
|
|
9
9
|
name: "@modern-js/plugin-router",
|
|
10
10
|
required: [
|
|
11
11
|
"@modern-js/runtime"
|
|
@@ -22,7 +22,7 @@ const routerPlugin = () => ({
|
|
|
22
22
|
const serverBase = serverRoutes.filter((route) => route.entryName === entrypoint.entryName).map((route) => route.urlPath).sort((a, b) => a.length - b.length > 0 ? -1 : 1);
|
|
23
23
|
const userConfig = api.getNormalizedConfig();
|
|
24
24
|
const routerConfig = (_getEntryOptions = getEntryOptions(entrypoint.entryName, entrypoint.isMainEntry, userConfig.runtime, userConfig.runtimeByEntries, packageName)) === null || _getEntryOptions === void 0 ? void 0 : _getEntryOptions.router;
|
|
25
|
-
if ((nestedRoutesEntry || pageRoutesEntry) && !isRouterV5) {
|
|
25
|
+
if ((nestedRoutesEntry || pageRoutesEntry) && !isRouterV5 && !(options === null || options === void 0 ? void 0 : options.disableRegisterRuntimePlugin)) {
|
|
26
26
|
plugins.push({
|
|
27
27
|
name: "router",
|
|
28
28
|
path: `@${metaName2}/runtime/router/internal`,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { AppTools, CliPluginFuture } from '@modern-js/app-tools';
|
|
2
2
|
export { isRouteEntry } from './entry';
|
|
3
3
|
export { handleFileChange, handleModifyEntrypoints } from './handler';
|
|
4
|
-
export declare const routerPlugin: (
|
|
4
|
+
export declare const routerPlugin: (options?: {
|
|
5
|
+
disableRegisterRuntimePlugin?: boolean;
|
|
6
|
+
}) => CliPluginFuture<AppTools<"shared">>;
|
|
5
7
|
export default routerPlugin;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.68.
|
|
18
|
+
"version": "2.68.19",
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=14.17.6"
|
|
21
21
|
},
|
|
@@ -219,13 +219,13 @@
|
|
|
219
219
|
"react-is": "^18",
|
|
220
220
|
"react-side-effect": "^2.1.2",
|
|
221
221
|
"styled-components": "^5.3.1",
|
|
222
|
-
"@modern-js/plugin": "2.68.
|
|
223
|
-
"@modern-js/plugin-
|
|
224
|
-
"@modern-js/
|
|
225
|
-
"@modern-js/
|
|
226
|
-
"@modern-js/
|
|
227
|
-
"@modern-js/types": "2.68.
|
|
228
|
-
"@modern-js/utils": "2.68.
|
|
222
|
+
"@modern-js/plugin": "2.68.19",
|
|
223
|
+
"@modern-js/plugin-v2": "2.68.19",
|
|
224
|
+
"@modern-js/render": "2.68.19",
|
|
225
|
+
"@modern-js/runtime-utils": "2.68.19",
|
|
226
|
+
"@modern-js/plugin-data-loader": "2.68.19",
|
|
227
|
+
"@modern-js/types": "2.68.19",
|
|
228
|
+
"@modern-js/utils": "2.68.19"
|
|
229
229
|
},
|
|
230
230
|
"peerDependencies": {
|
|
231
231
|
"react": ">=17",
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
},
|
|
234
234
|
"devDependencies": {
|
|
235
235
|
"@remix-run/web-fetch": "^4.1.3",
|
|
236
|
-
"@rsbuild/core": "1.
|
|
236
|
+
"@rsbuild/core": "1.6.1",
|
|
237
237
|
"@testing-library/react": "^13.4.0",
|
|
238
238
|
"@types/cookie": "0.6.0",
|
|
239
239
|
"@types/invariant": "^2.2.30",
|
|
@@ -249,10 +249,10 @@
|
|
|
249
249
|
"ts-node": "^10.9.1",
|
|
250
250
|
"typescript": "^5",
|
|
251
251
|
"webpack": "^5.102.1",
|
|
252
|
-
"@modern-js/app-tools": "2.68.
|
|
253
|
-
"@scripts/build": "2.66.0",
|
|
252
|
+
"@modern-js/app-tools": "2.68.19",
|
|
254
253
|
"@scripts/jest-config": "2.66.0",
|
|
255
|
-
"@
|
|
254
|
+
"@scripts/build": "2.66.0",
|
|
255
|
+
"@modern-js/core": "2.68.19"
|
|
256
256
|
},
|
|
257
257
|
"sideEffects": false,
|
|
258
258
|
"publishConfig": {
|