Installation
Add @sigx/ssr-islands on top of the server renderer and enable the client:* JSX types.
Install
pnpm add @sigx/ssr-islandsDependencies
@sigx/ssr-islands depends on @sigx/server-renderer (pulled in
automatically) and lists sigx as a peer dependency — so it slots into an app
you already render with the server renderer. The package is ESM-only.
If you are starting from scratch, install all three:
pnpm add sigx @sigx/server-renderer @sigx/ssr-islandsSubpath imports
The package ships three entry points:
| Import path | Use it for |
|---|---|
@sigx/ssr-islands | Everything — islandsPlugin, client hydration, registry, server helpers |
@sigx/ssr-islands/server | Server-only island utilities (createTrackingSignal, serializeSignalState) |
@sigx/ssr-islands/client | Client hydration + registry (hydrateIslands, registerComponent, loadIslandComponent, …) |
The main entry re-exports both the server and client surfaces, so most apps just
import from @sigx/ssr-islands. Split to /server and /client when you want to
keep server-only code out of the browser bundle.
Enabling the client:* directives
Nothing to enable. Importing the pack from anywhere in the program — the server's
@sigx/ssr-islands, the client's @sigx/ssr-islands/client — augments JSX
program-wide, so the attributes type-check everywhere:
// now valid, with no directive-specific import:
<Counter client:visible />
This is the same zero-import registration core's use:* directives use.
Upgrading from 0.13 or earlier: there used to be a types-only
@sigx/ssr-islands/jsxentry you had to import once. That subpath no longer exists as of core 0.14 — delete anyimport '@sigx/ssr-islands/jsx';or/// <reference types="@sigx/ssr-islands/jsx" />. Nothing replaces it.
