@modern-js/plugin-server 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.
@@ -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.
|
18
|
+
"version": "2.63.0",
|
19
19
|
"types": "./dist/types/cli.d.ts",
|
20
20
|
"jsnext:source": "./src/cli",
|
21
21
|
"main": "./dist/cjs/cli.js",
|
@@ -65,21 +65,21 @@
|
|
65
65
|
},
|
66
66
|
"dependencies": {
|
67
67
|
"@swc/helpers": "0.5.13",
|
68
|
-
"@modern-js/
|
69
|
-
"@modern-js/utils": "2.
|
70
|
-
"@modern-js/
|
68
|
+
"@modern-js/runtime-utils": "2.63.0",
|
69
|
+
"@modern-js/server-utils": "2.63.0",
|
70
|
+
"@modern-js/utils": "2.63.0"
|
71
71
|
},
|
72
72
|
"devDependencies": {
|
73
73
|
"@types/jest": "^29",
|
74
74
|
"@types/node": "^14",
|
75
75
|
"jest": "^29",
|
76
76
|
"typescript": "^5",
|
77
|
-
"@modern-js/app-tools": "2.
|
78
|
-
"@modern-js/server-core": "2.
|
79
|
-
"@modern-js/types": "2.
|
80
|
-
"@
|
81
|
-
"@scripts/
|
82
|
-
"@
|
77
|
+
"@modern-js/app-tools": "2.63.0",
|
78
|
+
"@modern-js/server-core": "2.63.0",
|
79
|
+
"@modern-js/types": "2.63.0",
|
80
|
+
"@modern-js/core": "2.63.0",
|
81
|
+
"@scripts/build": "2.63.0",
|
82
|
+
"@scripts/jest-config": "2.63.0"
|
83
83
|
},
|
84
84
|
"sideEffects": [
|
85
85
|
"*.css",
|