@absolutejs/absolute 0.19.0-beta.15 → 0.19.0-beta.16
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/.absolutejs/tsconfig.tsbuildinfo +1 -1
- package/dist/build.js +4 -3
- package/dist/build.js.map +3 -3
- package/dist/dev/client/handlers/react.ts +9 -7
- package/dist/index.js +4 -3
- package/dist/index.js.map +3 -3
- package/native/packages/darwin-arm64/fast_ops.dylib +0 -0
- package/native/packages/darwin-arm64/package.json +1 -1
- package/native/packages/darwin-x64/fast_ops.dylib +0 -0
- package/native/packages/darwin-x64/package.json +1 -1
- package/native/packages/linux-arm64/package.json +1 -1
- package/native/packages/linux-x64/fast_ops.so +0 -0
- package/native/packages/linux-x64/package.json +1 -1
- package/package.json +5 -5
|
@@ -13,7 +13,7 @@ export const handleReactUpdate = (message: {
|
|
|
13
13
|
manifest?: Record<string, string>;
|
|
14
14
|
pageModuleUrl?: string;
|
|
15
15
|
primarySource?: string;
|
|
16
|
-
|
|
16
|
+
serverDuration?: number;
|
|
17
17
|
};
|
|
18
18
|
}) => {
|
|
19
19
|
const currentFramework = detectCurrentFramework();
|
|
@@ -33,13 +33,13 @@ export const handleReactUpdate = (message: {
|
|
|
33
33
|
|
|
34
34
|
const refreshRuntime = window.$RefreshRuntime$;
|
|
35
35
|
|
|
36
|
-
const
|
|
36
|
+
const serverDuration = message.data.serverDuration;
|
|
37
37
|
|
|
38
38
|
// ESM fast path: import the page module directly (no index re-import)
|
|
39
39
|
const pageModuleUrl = message.data.pageModuleUrl;
|
|
40
40
|
|
|
41
41
|
if (pageModuleUrl && refreshRuntime) {
|
|
42
|
-
applyRefreshImport(pageModuleUrl, refreshRuntime,
|
|
42
|
+
applyRefreshImport(pageModuleUrl, refreshRuntime, serverDuration);
|
|
43
43
|
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
@@ -49,7 +49,7 @@ export const handleReactUpdate = (message: {
|
|
|
49
49
|
const newUrl = componentKey && message.data.manifest?.[componentKey];
|
|
50
50
|
|
|
51
51
|
if (newUrl && refreshRuntime) {
|
|
52
|
-
applyRefreshImport(newUrl, refreshRuntime,
|
|
52
|
+
applyRefreshImport(newUrl, refreshRuntime, serverDuration);
|
|
53
53
|
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
@@ -61,14 +61,16 @@ export const handleReactUpdate = (message: {
|
|
|
61
61
|
const applyRefreshImport = (
|
|
62
62
|
moduleUrl: string,
|
|
63
63
|
refreshRuntime: { performReactRefresh: () => void },
|
|
64
|
-
|
|
64
|
+
serverDuration?: number
|
|
65
65
|
) => {
|
|
66
|
+
const clientStart = performance.now();
|
|
66
67
|
import(`${moduleUrl}?t=${Date.now()}`)
|
|
67
68
|
.then(() => {
|
|
68
69
|
refreshRuntime.performReactRefresh();
|
|
69
70
|
|
|
70
|
-
if (
|
|
71
|
-
const
|
|
71
|
+
if (window.__HMR_WS__) {
|
|
72
|
+
const clientDuration = Math.round(performance.now() - clientStart);
|
|
73
|
+
const total = (serverDuration ?? 0) + clientDuration;
|
|
72
74
|
window.__HMR_WS__.send(
|
|
73
75
|
JSON.stringify({ duration: total, type: 'hmr-timing' })
|
|
74
76
|
);
|
package/dist/index.js
CHANGED
|
@@ -202800,6 +202800,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202800
202800
|
if (changedFile) {
|
|
202801
202801
|
const pageModuleUrl = await getReactModuleUrl(changedFile);
|
|
202802
202802
|
if (pageModuleUrl) {
|
|
202803
|
+
const serverDuration = Date.now() - startTime;
|
|
202803
202804
|
state.lastHmrPath = changedFile;
|
|
202804
202805
|
state.lastHmrFramework = "react";
|
|
202805
202806
|
broadcastToClients(state, {
|
|
@@ -202810,8 +202811,8 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202810
202811
|
manifest: state.manifest,
|
|
202811
202812
|
pageModuleUrl,
|
|
202812
202813
|
primarySource: changedFile,
|
|
202813
|
-
|
|
202814
|
-
|
|
202814
|
+
serverDuration,
|
|
202815
|
+
sourceFiles: reactFiles
|
|
202815
202816
|
},
|
|
202816
202817
|
type: "react-update"
|
|
202817
202818
|
});
|
|
@@ -204242,5 +204243,5 @@ export {
|
|
|
204242
204243
|
ANGULAR_INIT_TIMEOUT_MS
|
|
204243
204244
|
};
|
|
204244
204245
|
|
|
204245
|
-
//# debugId=
|
|
204246
|
+
//# debugId=65BA6BC8707FD3E164756E2164756E21
|
|
204246
204247
|
//# sourceMappingURL=index.js.map
|