TypeScript API / @laikacms/vite-plugin / createRepositoryChangeChannel
Function: createRepositoryChangeChannel()
ts
function createRepositoryChangeChannel(
repos,
server,
options?
): Unsubscribe;Wire a LaikaRepositories to a Vite dev server so on-disk content changes trigger HMR. Subscribes to the storage repository's push channel (and any future documents push channel) when it advertises one; repositories without subscription support are silently skipped.
Parameters
| Parameter | Type |
|---|---|
repos | LaikaRepositories |
server | HmrServer |
options | RepositoryChangeChannelOptions |
Returns
a dispose function that removes every subscription. Idempotent.