Render the components to static HTML using Declarative Shadow DOM.
| Argument | Description |
|---|---|
<files...> | Component source files to prerender. |
| Option | Description |
|---|---|
-o, --output <path> | Write the markup to a file instead of stdout. |
$ banira prerender src/*.ts -o prerendered.htmlUses Declarative Shadow DOM so the shadow content is present in the served HTML — useful for first paint and for consumers without JavaScript enabled. A component's constructable stylesheet is inlined as critical CSS so the markup is styled before JS (FOUC-free).
For programmatic SSR, the createPrerenderer(files) library export returns
renderToString(tag, { attributes, children }) for meta-frameworks, and createEleventyPlugin
wires that into an Eleventy build. On the client, hydrateShadow
adopts the prerendered root (no re-render, no flash).