Deploy/Adapters/Cloudflare
@sigx/cloudflare · Stable

Cloudflare#

The flagship adapter — a fully bundled, workerd-conditioned worker with a node-free render path, a wrangler.jsonc scaffolded once and validated on drift, and optional local binding proxies in dev. Deploy with wrangler deploy.

v0.13.0 MIT

Installation#

Terminal
pnpm add -D @sigx/cloudflare
pnpm add -D wrangler   # deploys, and the devProxy local bindings

Usage#

TypeScript
// vite.config.cloudflare.ts
import { defineConfig } from 'vite';
import sigx from '@sigx/vite';
import { cloudflare } from '@sigx/cloudflare';

export default defineConfig({
    plugins: [sigx({ ssr: { entry: 'src/entry-server.tsx', adapter: cloudflare() } })]
});

vite build --app -c vite.config.cloudflare.ts then produces a fully bundled workerd-conditioned worker (serverBuild: 'bundled', conditions ['workerd', 'worker'] — the node condition is deliberately dropped; the render path is node:-free by CI guarantee) plus the client assets. Deploy with wrangler deploy — wrangler's own bundling is a pass-through for the prebundled output (no_bundle is the escape hatch if it ever isn't).

About#

@sigx/cloudflare is a Deploy adapter — bundled workerd worker + wrangler scaffold. It ships from the core repo in lockstep with the release it deploys, so the adapter always matches your sigx version.

It is a pack in the established sense: it rides @sigx/vite's public SigxAdapter seam with no privileged access. The runtime story is createFetchHandler (WinterCG-clean, CI-enforced); everything in this package is build glue.

Next steps#

Continue with Deploying to Workers for the entry, wrangler.jsonc and dev-bindings walkthrough, or jump to the API reference.