@modern-js/plugin-data-loader 2.62.0 → 2.63.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.
|
@@ -26,6 +26,7 @@ module.exports = __toCommonJS(runtime_exports);
|
|
|
26
26
|
var import_browser = require("@modern-js/runtime-utils/browser");
|
|
27
27
|
var import_node = require("@modern-js/runtime-utils/node");
|
|
28
28
|
var import_remix_router = require("@modern-js/runtime-utils/remix-router");
|
|
29
|
+
var import_server = require("@modern-js/runtime-utils/server");
|
|
29
30
|
var import_time = require("@modern-js/runtime-utils/time");
|
|
30
31
|
var import_lodash = require("@modern-js/utils/lodash");
|
|
31
32
|
var import_constants = require("@modern-js/utils/universal/constants");
|
|
@@ -61,7 +62,7 @@ function convertModernRedirectResponse(headers, basename) {
|
|
|
61
62
|
const handleRequest = async ({ request, serverRoutes, routes: routesConfig, context, onTiming }) => {
|
|
62
63
|
const url = new URL(request.url);
|
|
63
64
|
const routeId = url.searchParams.get(import_constants2.LOADER_ID_PARAM);
|
|
64
|
-
const entry = (0,
|
|
65
|
+
const entry = (0, import_server.matchEntry)(url.pathname, serverRoutes);
|
|
65
66
|
if (!routeId || !entry) {
|
|
66
67
|
return;
|
|
67
68
|
}
|
|
@@ -3,8 +3,9 @@ import { _ as _instanceof } from "@swc/helpers/_/_instanceof";
|
|
|
3
3
|
import { _ as _type_of } from "@swc/helpers/_/_type_of";
|
|
4
4
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
5
5
|
import { transformNestedRoutes } from "@modern-js/runtime-utils/browser";
|
|
6
|
-
import { createRequestContext,
|
|
6
|
+
import { createRequestContext, reporterCtx } from "@modern-js/runtime-utils/node";
|
|
7
7
|
import { UNSAFE_DEFERRED_SYMBOL as DEFERRED_SYMBOL, createStaticHandler, isRouteErrorResponse, json } from "@modern-js/runtime-utils/remix-router";
|
|
8
|
+
import { matchEntry } from "@modern-js/runtime-utils/server";
|
|
8
9
|
import { time } from "@modern-js/runtime-utils/time";
|
|
9
10
|
import { isPlainObject } from "@modern-js/utils/lodash";
|
|
10
11
|
import { LOADER_REPORTER_NAME } from "@modern-js/utils/universal/constants";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { transformNestedRoutes } from "@modern-js/runtime-utils/browser";
|
|
2
|
-
import { createRequestContext,
|
|
2
|
+
import { createRequestContext, reporterCtx } from "@modern-js/runtime-utils/node";
|
|
3
3
|
import { UNSAFE_DEFERRED_SYMBOL as DEFERRED_SYMBOL, createStaticHandler, isRouteErrorResponse, json } from "@modern-js/runtime-utils/remix-router";
|
|
4
|
+
import { matchEntry } from "@modern-js/runtime-utils/server";
|
|
4
5
|
import { time } from "@modern-js/runtime-utils/time";
|
|
5
6
|
import { isPlainObject } from "@modern-js/utils/lodash";
|
|
6
7
|
import { LOADER_REPORTER_NAME } from "@modern-js/utils/universal/constants";
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.63.0",
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=16.2.0"
|
|
21
21
|
},
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"@babel/core": "^7.26.0",
|
|
50
50
|
"@swc/helpers": "0.5.13",
|
|
51
51
|
"path-to-regexp": "^6.2.0",
|
|
52
|
-
"@modern-js/
|
|
53
|
-
"@modern-js/utils": "2.
|
|
52
|
+
"@modern-js/utils": "2.63.0",
|
|
53
|
+
"@modern-js/runtime-utils": "2.63.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/babel__core": "^7.20.5",
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
"ts-jest": "^29.1.0",
|
|
67
67
|
"typescript": "^5",
|
|
68
68
|
"webpack": "^5.96.1",
|
|
69
|
-
"@modern-js/
|
|
70
|
-
"@modern-js/core": "2.
|
|
71
|
-
"@
|
|
72
|
-
"@
|
|
73
|
-
"@scripts/jest-config": "2.
|
|
69
|
+
"@modern-js/core": "2.63.0",
|
|
70
|
+
"@modern-js/server-core": "2.63.0",
|
|
71
|
+
"@scripts/build": "2.63.0",
|
|
72
|
+
"@modern-js/types": "2.63.0",
|
|
73
|
+
"@scripts/jest-config": "2.63.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"react": ">=17.0.0"
|