@umijs/server 4.0.0-rc.13 → 4.0.0-rc.14
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.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.js +2 -0
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -14,4 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.createServerRoutes = void 0;
|
|
18
|
+
var routes_1 = require("./routes");
|
|
19
|
+
Object.defineProperty(exports, "createServerRoutes", { enumerable: true, get: function () { return routes_1.createServerRoutes; } });
|
|
17
20
|
__exportStar(require("./server"), exports);
|
package/dist/server.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export interface IOpts {
|
|
|
11
11
|
metas?: Record<string, string>[];
|
|
12
12
|
styles?: (Record<string, string> | string)[];
|
|
13
13
|
favicon?: string;
|
|
14
|
+
title?: string;
|
|
14
15
|
headScripts?: (Record<string, string> | string)[];
|
|
15
16
|
scripts?: (Record<string, string> | string)[];
|
|
16
17
|
mountElementId?: string;
|
package/dist/server.js
CHANGED
|
@@ -56,6 +56,7 @@ function getMarkup(opts) {
|
|
|
56
56
|
const favicon = opts.favicon
|
|
57
57
|
? `<link rel="shortcut icon" href="${opts.favicon}">`
|
|
58
58
|
: '';
|
|
59
|
+
const title = opts.title ? `<title>${opts.title}</title>` : '';
|
|
59
60
|
const metas = (opts.metas || []).map((meta) => getTagContent({ attrs: meta, tagName: 'meta' }));
|
|
60
61
|
const links = (opts.links || []).map((link) => getTagContent({ attrs: link, tagName: 'link' }));
|
|
61
62
|
const styles = (0, styles_1.normalizeStyles)(opts.styles || []).map(getStyleContent);
|
|
@@ -73,6 +74,7 @@ function getMarkup(opts) {
|
|
|
73
74
|
<meta http-equiv="X-UA-Compatible" content="ie=edge" />`,
|
|
74
75
|
metas.join('\n'),
|
|
75
76
|
favicon,
|
|
77
|
+
title,
|
|
76
78
|
links.join('\n'),
|
|
77
79
|
styles.join('\n'),
|
|
78
80
|
headScripts.join('\n'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/server",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.14",
|
|
4
4
|
"description": "@umijs/server",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi-next/tree/master/packages/server#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi-next/issues",
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "pnpm tsc",
|
|
19
|
-
"build:deps": "
|
|
19
|
+
"build:deps": "umi-scripts bundleDeps",
|
|
20
20
|
"dev": "pnpm build -- --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@umijs/bundler-utils": "4.0.0-rc.
|
|
23
|
+
"@umijs/bundler-utils": "4.0.0-rc.14",
|
|
24
24
|
"history": "5.3.0",
|
|
25
|
-
"react": "
|
|
26
|
-
"react-dom": "
|
|
25
|
+
"react": "18.1.0",
|
|
26
|
+
"react-dom": "18.1.0",
|
|
27
27
|
"react-router-dom": "6.3.0"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|