Server/Packages/Islands/Installation
@sigx/ssr-islands · Stable

Installation#

Add @sigx/ssr-islands on top of the server renderer and enable the client:* JSX types.

Install#

Terminal
pnpm add @sigx/ssr-islands

Dependencies#

@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:

Terminal
pnpm add sigx @sigx/server-renderer @sigx/ssr-islands

Subpath imports#

The package ships three entry points:

Import pathUse it for
@sigx/ssr-islandsEverything — islandsPlugin, client hydration, registry, server helpers
@sigx/ssr-islands/serverServer-only island utilities (createTrackingSignal, serializeSignalState)
@sigx/ssr-islands/clientClient 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:

TSX
// 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/jsx entry you had to import once. That subpath no longer exists as of core 0.14 — delete any import '@sigx/ssr-islands/jsx'; or /// <reference types="@sigx/ssr-islands/jsx" />. Nothing replaces it.

Next steps#