@modern-js/plugin-server 2.60.6 → 2.60.7-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -23,13 +23,13 @@ __export(assets_exports, {
|
|
23
23
|
injectAssetsTags: () => injectAssetsTags
|
24
24
|
});
|
25
25
|
module.exports = __toCommonJS(assets_exports);
|
26
|
-
var import_node = require("@modern-js/runtime-utils/node");
|
27
26
|
var import_remix_router = require("@modern-js/runtime-utils/remix-router");
|
27
|
+
var import_server = require("@modern-js/runtime-utils/server");
|
28
28
|
const createScript = (href, nonce) => `<script defer src="${href}"${nonce ? ` nonce="${nonce}"` : ""}></script>`;
|
29
29
|
const createCss = (href) => `<link rel="stylesheet" type="text/css" href="${href}">`;
|
30
30
|
const getAssets = (html, nestedRoutes, routesJson, routesManifest, pathname) => {
|
31
31
|
const serverRoutes = routesJson.routes;
|
32
|
-
const entry = (0,
|
32
|
+
const entry = (0, import_server.matchEntry)(pathname, serverRoutes);
|
33
33
|
if (!entry) {
|
34
34
|
return {};
|
35
35
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
2
|
-
import { matchEntry } from "@modern-js/runtime-utils/node";
|
3
2
|
import { matchRoutes } from "@modern-js/runtime-utils/remix-router";
|
3
|
+
import { matchEntry } from "@modern-js/runtime-utils/server";
|
4
4
|
var createScript = function(href, nonce) {
|
5
5
|
return '<script defer src="'.concat(href, '"').concat(nonce ? ' nonce="'.concat(nonce, '"') : "", "></script>");
|
6
6
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { matchEntry } from "@modern-js/runtime-utils/node";
|
2
1
|
import { matchRoutes } from "@modern-js/runtime-utils/remix-router";
|
2
|
+
import { matchEntry } from "@modern-js/runtime-utils/server";
|
3
3
|
const createScript = (href, nonce) => `<script defer src="${href}"${nonce ? ` nonce="${nonce}"` : ""}></script>`;
|
4
4
|
const createCss = (href) => `<link rel="stylesheet" type="text/css" href="${href}">`;
|
5
5
|
const getAssets = (html, nestedRoutes, routesJson, routesManifest, pathname) => {
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.60.
|
18
|
+
"version": "2.60.7-alpha.0",
|
19
19
|
"types": "./dist/types/cli.d.ts",
|
20
20
|
"jsnext:source": "./src/cli",
|
21
21
|
"main": "./dist/cjs/cli.js",
|
@@ -65,9 +65,9 @@
|
|
65
65
|
},
|
66
66
|
"dependencies": {
|
67
67
|
"@swc/helpers": "0.5.13",
|
68
|
-
"@modern-js/runtime-utils": "2.60.
|
69
|
-
"@modern-js/
|
70
|
-
"@modern-js/utils": "2.60.6"
|
68
|
+
"@modern-js/runtime-utils": "2.60.7-alpha.0",
|
69
|
+
"@modern-js/utils": "2.60.6",
|
70
|
+
"@modern-js/server-utils": "2.60.6"
|
71
71
|
},
|
72
72
|
"devDependencies": {
|
73
73
|
"@types/jest": "^29",
|
@@ -75,10 +75,10 @@
|
|
75
75
|
"jest": "^29",
|
76
76
|
"typescript": "^5",
|
77
77
|
"@modern-js/app-tools": "2.60.6",
|
78
|
-
"@modern-js/core": "2.60.6",
|
79
|
-
"@modern-js/server-core": "2.60.6",
|
80
78
|
"@scripts/build": "2.60.6",
|
79
|
+
"@modern-js/server-core": "2.60.6",
|
81
80
|
"@modern-js/types": "2.60.6",
|
81
|
+
"@modern-js/core": "2.60.6",
|
82
82
|
"@scripts/jest-config": "2.60.6"
|
83
83
|
},
|
84
84
|
"sideEffects": [
|