@shuvi/platform-web 1.0.15 → 1.0.17
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/esm/shared/htmlRenderer.d.ts +1 -1
- package/esm/shuvi-app/app/client.js +3 -0
- package/esm/shuvi-app/dev/hotDevClient.js +5 -0
- package/esm/shuvi-app/react/ErrorPage.jsx +1 -1
- package/lib/node/features/html-render/lib/generateFilesByRoutId.js +1 -1
- package/lib/shared/htmlRenderer.d.ts +1 -1
- package/package.json +13 -13
|
@@ -110,6 +110,11 @@ function onFastRefresh(hasUpdates) {
|
|
|
110
110
|
const endLatency = Date.now();
|
|
111
111
|
const latency = endLatency - startLatency;
|
|
112
112
|
console.log(`[Fast Refresh] done in ${latency}ms`);
|
|
113
|
+
sendMessage(JSON.stringify({
|
|
114
|
+
event: 'client-hmr-latency',
|
|
115
|
+
startTime: startLatency,
|
|
116
|
+
endTime: endLatency
|
|
117
|
+
}));
|
|
113
118
|
}
|
|
114
119
|
}
|
|
115
120
|
// Successful compilation.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import error from './Error';
|
|
3
|
-
import userError from '@shuvi/app/
|
|
3
|
+
import userError from '@shuvi/app/user/error';
|
|
4
4
|
const Error = userError || error;
|
|
5
5
|
export default function ErrorPage({ code, message }) {
|
|
6
6
|
return <Error errorCode={code} errorDesc={message}/>;
|
|
@@ -4,7 +4,7 @@ function generateFilesByRoutId(assetMap, routes) {
|
|
|
4
4
|
let filesByRoutId = {};
|
|
5
5
|
const loadable = assetMap.loadble;
|
|
6
6
|
routes.forEach(({ id, __componentRawRequest__ }) => {
|
|
7
|
-
if (__componentRawRequest__) {
|
|
7
|
+
if (__componentRawRequest__ && loadable[__componentRawRequest__]) {
|
|
8
8
|
filesByRoutId[id] = loadable[__componentRawRequest__].files;
|
|
9
9
|
}
|
|
10
10
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shuvi/platform-web",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/shuvijs/shuvi.git",
|
|
@@ -72,17 +72,17 @@
|
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@next/react-refresh-utils": "12.1.6",
|
|
75
|
-
"@shuvi/error-overlay": "1.0.
|
|
76
|
-
"@shuvi/hook": "1.0.
|
|
77
|
-
"@shuvi/platform-shared": "1.0.
|
|
78
|
-
"doura": "0.0.
|
|
79
|
-
"react-doura": "0.0.
|
|
80
|
-
"@shuvi/router": "1.0.
|
|
81
|
-
"@shuvi/router-react": "1.0.
|
|
82
|
-
"@shuvi/runtime": "1.0.
|
|
83
|
-
"@shuvi/shared": "1.0.
|
|
84
|
-
"@shuvi/toolpack": "1.0.
|
|
85
|
-
"@shuvi/utils": "1.0.
|
|
75
|
+
"@shuvi/error-overlay": "1.0.17",
|
|
76
|
+
"@shuvi/hook": "1.0.17",
|
|
77
|
+
"@shuvi/platform-shared": "1.0.17",
|
|
78
|
+
"doura": "0.0.8",
|
|
79
|
+
"react-doura": "0.0.8",
|
|
80
|
+
"@shuvi/router": "1.0.17",
|
|
81
|
+
"@shuvi/router-react": "1.0.17",
|
|
82
|
+
"@shuvi/runtime": "1.0.17",
|
|
83
|
+
"@shuvi/shared": "1.0.17",
|
|
84
|
+
"@shuvi/toolpack": "1.0.17",
|
|
85
|
+
"@shuvi/utils": "1.0.17",
|
|
86
86
|
"content-type": "1.0.4",
|
|
87
87
|
"core-js": "3.6.5",
|
|
88
88
|
"ejs": "3.1.5",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"whatwg-fetch": "3.0.0"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
|
-
"@shuvi/service": "1.0.
|
|
101
|
+
"@shuvi/service": "1.0.17"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
104
|
"@shuvi/service": "workspace:*",
|