@elurjs/kit 2.4.6 → 2.4.7
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/CHANGELOG.md +14 -1
- package/dist/lib/cli.cjs +9 -1
- package/dist/lib/cli.cjs.map +1 -1
- package/dist/lib/cli.js +9 -1
- package/dist/lib/cli.js.map +1 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/{interpolation-plugin-CMPCDlVJ.cjs → interpolation-plugin-TWDch8nn.cjs} +10 -2
- package/dist/lib/{interpolation-plugin-CMPCDlVJ.cjs.map → interpolation-plugin-TWDch8nn.cjs.map} +1 -1
- package/dist/lib/{interpolation-plugin-Bt-KRKVY.js → interpolation-plugin-Wgb1j4pT.js} +10 -2
- package/dist/lib/{interpolation-plugin-Bt-KRKVY.js.map → interpolation-plugin-Wgb1j4pT.js.map} +1 -1
- package/dist/lib/vite/index.cjs +1 -1
- package/dist/lib/vite/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes to
|
|
3
|
+
All notable changes to Elur Kit are documented in this file.
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.4.7]
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **Client entry now defers hydration with `requestIdleCallback`** — the
|
|
13
|
+
auto-generated `entry-client.ts` wraps `hydrateIslands(registry)` in
|
|
14
|
+
`requestIdleCallback(hydrate, { timeout: 2000 })` (with a `setTimeout`
|
|
15
|
+
fallback) so the browser can paint the server-rendered HTML before
|
|
16
|
+
hydrating islands. This reduces LCP element render delay on mobile
|
|
17
|
+
devices where the main thread was blocked by synchronous hydration.
|
|
18
|
+
Islands with directive `"load"` already have SSR-rendered DOM, so
|
|
19
|
+
users see content immediately — hydration only adds interactivity.
|
|
20
|
+
|
|
8
21
|
## [2.4.6]
|
|
9
22
|
|
|
10
23
|
### Fixed
|
package/dist/lib/cli.cjs
CHANGED
|
@@ -211,7 +211,15 @@ function buildEntrySource(islands, outFile, hydrateImport = "@elurjs/kit/island"
|
|
|
211
211
|
const islandHydration = registryLines ? `const registry = {
|
|
212
212
|
${registryLines}
|
|
213
213
|
};
|
|
214
|
-
|
|
214
|
+
// Defer hydration until the browser is idle so the first paint is not
|
|
215
|
+
// blocked. Islands with directive "load" already have SSR-rendered DOM,
|
|
216
|
+
// so the user sees content immediately — hydration only adds interactivity.
|
|
217
|
+
const hydrate = () => hydrateIslands(registry);
|
|
218
|
+
if ("requestIdleCallback" in window) {
|
|
219
|
+
requestIdleCallback(hydrate, { timeout: 2000 });
|
|
220
|
+
} else {
|
|
221
|
+
setTimeout(hydrate, 0);
|
|
222
|
+
}
|
|
215
223
|
document.addEventListener("elur:rendered", () => {
|
|
216
224
|
cleanupHydratedIslands();
|
|
217
225
|
hydrateIslands(registry);
|