mnfst 0.5.116 → 0.5.117
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/lib/manifest.integrity.json +1 -1
- package/lib/manifest.js +10 -0
- package/package.json +1 -1
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"manifest.tooltips.js": "sha384-Hhip5ZN66xhDw3m0XBrKLKLpcVRz3Z9RszPKqo6xvFF0mrUgQBVZ+mZjZsXgOOjS",
|
|
23
23
|
"manifest.url.parameters.js": "sha384-FIufiClqDx1rJpU/QUc9z/D43qClQ6Qm8rBahipbJl9BDHUvhrOsUDegmTWW7Tuf",
|
|
24
24
|
"manifest.utilities.js": "sha384-x07Pfi4UxK9tbdcOZgZ5jkveseT1xBUTFtO08ORcokCH64FHsUceoiAICAsRJMle",
|
|
25
|
-
"manifest.js": "sha384-
|
|
25
|
+
"manifest.js": "sha384-S63QjTNS3dG0doW+o2PByZ7ZYY2i1rPGoXQZ5O6k1lViYW+UCn9dSXRhRkguivpg"
|
|
26
26
|
}
|
package/lib/manifest.js
CHANGED
|
@@ -37,6 +37,16 @@
|
|
|
37
37
|
// Only run on pages the prerender marked as static MPA output.
|
|
38
38
|
const prerenderMeta = document.querySelector('meta[name="manifest:prerendered"]');
|
|
39
39
|
if (!prerenderMeta || prerenderMeta.getAttribute('content') === '0') return;
|
|
40
|
+
|
|
41
|
+
// Remove baked x-for/x-if clones the prerender kept for crawlers. Their
|
|
42
|
+
// <template> is still live, so Alpine re-renders the list/conditional on
|
|
43
|
+
// boot; dropping the baked copies first (before Alpine runs) avoids a
|
|
44
|
+
// duplicate render. data-hydrate islands keep their baked DOM.
|
|
45
|
+
document.querySelectorAll('[data-mnfst-prerender-clone]').forEach((el) => {
|
|
46
|
+
if (el.closest && el.closest('[data-hydrate]')) return;
|
|
47
|
+
el.remove();
|
|
48
|
+
});
|
|
49
|
+
|
|
40
50
|
const blob = document.getElementById('__manifest_hydrate__');
|
|
41
51
|
if (!blob) return;
|
|
42
52
|
let entries;
|