ezfw-core 1.0.35 → 1.0.37
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/islands/StaticHtmlRenderer.js +4 -3
- package/islands/StaticHtmlRenderer.ts +467 -464
- package/islands/ViteIslandsPlugin.js +1 -4
- package/islands/ViteIslandsPlugin.ts +996 -992
- package/package.json +1 -1
|
@@ -122,10 +122,11 @@ export class StaticHtmlRenderer {
|
|
|
122
122
|
props: this.serializableProps(props)
|
|
123
123
|
};
|
|
124
124
|
ctx.islands.push(islandData);
|
|
125
|
-
// Render
|
|
125
|
+
// Render the full static content (for SEO)
|
|
126
|
+
const staticContent = await this.renderStaticComponent(name, definition, props, ctx);
|
|
127
|
+
// Wrap in island container with data attributes for hydration
|
|
126
128
|
const propsJson = this.escapeAttr(JSON.stringify(islandData.props));
|
|
127
|
-
|
|
128
|
-
return `<div data-ez-island="${name}" data-ez-island-id="${islandId}" data-ez-props="${propsJson}" class="ez-island-loading"><div class="ez-island-spinner"></div></div>`;
|
|
129
|
+
return `<div data-ez-island="${name}" data-ez-island-id="${islandId}" data-ez-props="${propsJson}">${staticContent}</div>`;
|
|
129
130
|
}
|
|
130
131
|
/**
|
|
131
132
|
* Render a config object to HTML
|