@absolutejs/absolute 0.19.0-beta.13 → 0.19.0-beta.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/.absolutejs/tsconfig.tsbuildinfo +1 -1
- package/dist/build.js +4 -4
- package/dist/build.js.map +3 -3
- package/dist/dev/client/handlers/react.ts +13 -3
- package/dist/index.js +4 -4
- 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,6 +13,7 @@ export const handleReactUpdate = (message: {
|
|
|
13
13
|
manifest?: Record<string, string>;
|
|
14
14
|
pageModuleUrl?: string;
|
|
15
15
|
primarySource?: string;
|
|
16
|
+
startTime?: number;
|
|
16
17
|
};
|
|
17
18
|
}) => {
|
|
18
19
|
const currentFramework = detectCurrentFramework();
|
|
@@ -32,11 +33,13 @@ export const handleReactUpdate = (message: {
|
|
|
32
33
|
|
|
33
34
|
const refreshRuntime = window.$RefreshRuntime$;
|
|
34
35
|
|
|
36
|
+
const serverStartTime = message.data.startTime;
|
|
37
|
+
|
|
35
38
|
// ESM fast path: import the page module directly (no index re-import)
|
|
36
39
|
const pageModuleUrl = message.data.pageModuleUrl;
|
|
37
40
|
|
|
38
41
|
if (pageModuleUrl && refreshRuntime) {
|
|
39
|
-
applyRefreshImport(pageModuleUrl, refreshRuntime);
|
|
42
|
+
applyRefreshImport(pageModuleUrl, refreshRuntime, serverStartTime);
|
|
40
43
|
|
|
41
44
|
return;
|
|
42
45
|
}
|
|
@@ -46,7 +49,7 @@ export const handleReactUpdate = (message: {
|
|
|
46
49
|
const newUrl = componentKey && message.data.manifest?.[componentKey];
|
|
47
50
|
|
|
48
51
|
if (newUrl && refreshRuntime) {
|
|
49
|
-
applyRefreshImport(newUrl, refreshRuntime);
|
|
52
|
+
applyRefreshImport(newUrl, refreshRuntime, serverStartTime);
|
|
50
53
|
|
|
51
54
|
return;
|
|
52
55
|
}
|
|
@@ -57,11 +60,18 @@ export const handleReactUpdate = (message: {
|
|
|
57
60
|
|
|
58
61
|
const applyRefreshImport = (
|
|
59
62
|
moduleUrl: string,
|
|
60
|
-
refreshRuntime: { performReactRefresh: () => void }
|
|
63
|
+
refreshRuntime: { performReactRefresh: () => void },
|
|
64
|
+
serverStartTime?: number
|
|
61
65
|
) => {
|
|
62
66
|
import(`${moduleUrl}?t=${Date.now()}`)
|
|
63
67
|
.then(() => {
|
|
64
68
|
refreshRuntime.performReactRefresh();
|
|
69
|
+
|
|
70
|
+
if (serverStartTime) {
|
|
71
|
+
const total = Date.now() - serverStartTime;
|
|
72
|
+
console.log(`[HMR] updated in ${total}ms`);
|
|
73
|
+
}
|
|
74
|
+
|
|
65
75
|
if (window.__ERROR_BOUNDARY__) {
|
|
66
76
|
window.__ERROR_BOUNDARY__.reset();
|
|
67
77
|
} else {
|
package/dist/index.js
CHANGED
|
@@ -202790,8 +202790,7 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202790
202790
|
if (changedFile) {
|
|
202791
202791
|
const pageModuleUrl = await getReactModuleUrl(changedFile);
|
|
202792
202792
|
if (pageModuleUrl) {
|
|
202793
|
-
|
|
202794
|
-
logHmrUpdate(changedFile, "react", duration2);
|
|
202793
|
+
logHmrUpdate(changedFile, "react", Date.now() - startTime);
|
|
202795
202794
|
broadcastToClients(state, {
|
|
202796
202795
|
data: {
|
|
202797
202796
|
framework: "react",
|
|
@@ -202800,7 +202799,8 @@ var parseErrorLocationFromMessage = (msg) => {
|
|
|
202800
202799
|
manifest: state.manifest,
|
|
202801
202800
|
pageModuleUrl,
|
|
202802
202801
|
primarySource: changedFile,
|
|
202803
|
-
sourceFiles: reactFiles
|
|
202802
|
+
sourceFiles: reactFiles,
|
|
202803
|
+
startTime
|
|
202804
202804
|
},
|
|
202805
202805
|
type: "react-update"
|
|
202806
202806
|
});
|
|
@@ -204231,5 +204231,5 @@ export {
|
|
|
204231
204231
|
ANGULAR_INIT_TIMEOUT_MS
|
|
204232
204232
|
};
|
|
204233
204233
|
|
|
204234
|
-
//# debugId=
|
|
204234
|
+
//# debugId=B86E30B640AC1F6964756E2164756E21
|
|
204235
204235
|
//# sourceMappingURL=index.js.map
|