@absolutejs/absolute 0.19.0-beta.12 → 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/.claude/settings.local.json +3 -1
- package/dist/build.js +274 -121
- package/dist/build.js.map +6 -4
- package/dist/dev/client/handlers/react.ts +13 -3
- package/dist/index.js +295 -127
- package/dist/index.js.map +8 -6
- package/dist/src/dev/moduleServer.d.ts +8 -0
- package/dist/src/dev/transformCache.d.ts +4 -0
- package/dist/src/plugins/hmr.d.ts +1 -1
- 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 {
|