@absolutejs/absolute 0.19.0-beta.16 → 0.19.0-beta.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.
@@ -66,13 +66,22 @@ const applyRefreshImport = (
66
66
  const clientStart = performance.now();
67
67
  import(`${moduleUrl}?t=${Date.now()}`)
68
68
  .then(() => {
69
+ const fetchDone = performance.now();
69
70
  refreshRuntime.performReactRefresh();
71
+ const refreshDone = performance.now();
70
72
 
71
73
  if (window.__HMR_WS__) {
72
- const clientDuration = Math.round(performance.now() - clientStart);
73
- const total = (serverDuration ?? 0) + clientDuration;
74
+ const fetchMs = Math.round(fetchDone - clientStart);
75
+ const refreshMs = Math.round(refreshDone - fetchDone);
76
+ const total = (serverDuration ?? 0) + fetchMs + refreshMs;
74
77
  window.__HMR_WS__.send(
75
- JSON.stringify({ duration: total, type: 'hmr-timing' })
78
+ JSON.stringify({
79
+ duration: total,
80
+ fetchMs,
81
+ refreshMs,
82
+ serverMs: serverDuration ?? 0,
83
+ type: 'hmr-timing'
84
+ })
76
85
  );
77
86
  }
78
87
 
package/dist/index.js CHANGED
@@ -172448,12 +172448,18 @@ var trySendMessage = (client2, messageStr) => {
172448
172448
  state.activeFrameworks.add(data.framework);
172449
172449
  }
172450
172450
  break;
172451
- case "hmr-timing":
172452
- if (data.duration !== undefined) {
172451
+ case "hmr-timing": {
172452
+ const timing = data;
172453
+ if (timing.duration !== undefined) {
172453
172454
  const lastPath = state.lastHmrPath ?? "";
172454
- logHmrUpdate(lastPath, state.lastHmrFramework, data.duration);
172455
+ const breakdown = timing.serverMs !== undefined ? ` (server ${timing.serverMs}ms + fetch ${timing.fetchMs ?? 0}ms + refresh ${timing.refreshMs ?? 0}ms)` : "";
172456
+ logHmrUpdate(lastPath, state.lastHmrFramework, timing.duration);
172457
+ if (breakdown) {
172458
+ console.log(` ${breakdown}`);
172459
+ }
172455
172460
  }
172456
172461
  break;
172462
+ }
172457
172463
  }
172458
172464
  }, handleHMRMessage = (state, client2, message) => {
172459
172465
  try {
@@ -204243,5 +204249,5 @@ export {
204243
204249
  ANGULAR_INIT_TIMEOUT_MS
204244
204250
  };
204245
204251
 
204246
- //# debugId=65BA6BC8707FD3E164756E2164756E21
204252
+ //# debugId=6655048BCB2F286B64756E2164756E21
204247
204253
  //# sourceMappingURL=index.js.map