rwsdk
Version:
Build fast, server-driven webapps on Cloudflare with SSR, RSC, and realtime
12 lines (11 loc) • 440 B
JavaScript
let capnwebPromise = null;
export function loadCapnweb() {
if (!capnwebPromise) {
capnwebPromise = import("capnweb").catch(() => {
throw new Error('The "use-synced-state" feature requires the "capnweb" package, ' +
'which is not installed. Install it with your package manager ' +
'(e.g. `npm install capnweb` or `pnpm add capnweb`).');
});
}
return capnwebPromise;
}