If your project does not use Vite, or you need explicit control over every aspect of your Wrangler configuration, you can wire Sideffect up directly without the Vite adapter. In this mode you manually export the generatedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/eersnington/sideffect/llms.txt
Use this file to discover all available pages before exploring further.
WorkflowEntrypoint classes from your Worker entry file and declare the corresponding workflow bindings in wrangler.jsonc. There is no code generation or automatic discovery — everything is explicit and fully transparent.
Vite vs. plain Wrangler: Use the Vite adapter (
withCloudflareWorkflows from sideffect/vite) when you want automatic workflow discovery, generated wrangler.jsonc bindings, and auto-generated env types. Use the plain Wrangler setup when you are not using Vite, need full control over your Wrangler configuration, or want to integrate Sideffect into an existing non-Vite build pipeline.Define a workflow layer
Create your workflow definition and bind it to an implementation using
.toLayer(). The name field controls how Cloudflare identifies the workflow and must match the name field you will add to wrangler.jsonc in a later step.Create entrypoints
Use
WorkflowEntrypoints.make() from sideffect/cloudflare to convert your workflow layer into a native Cloudflare WorkflowEntrypoint subclass. Pass an object where each key is the desired class_name as it will appear in wrangler.jsonc.The key you pass to
WorkflowEntrypoints.make() — ImageProcessing in the example above — must exactly match the class_name you declare in wrangler.jsonc. Sideffect validates that this key is a valid JavaScript identifier at runtime and throws a TypeError if it is not.Export from Worker entry
Combine the generated entrypoint export with your Worker’s
fetch handler in a single entry file. The workflow binding (IMAGE_PROCESSING here) is available on env and used exactly as you would use any other Cloudflare binding.Configure wrangler.jsonc
Register the workflow in your
wrangler.jsonc. The binding field is the name exposed on env, name must match the name used in Workflow.make(), and class_name must match the key you passed to WorkflowEntrypoints.make().The
class_name value in wrangler.jsonc must exactly match the key passed to WorkflowEntrypoints.make(). Cloudflare uses class_name to locate the exported WorkflowEntrypoint subclass in your Worker bundle.Add env types
If you are not using This declaration makes
wrangler types or want to type the workflow binding manually, augment the Cloudflare.Env interface with the binding name and its payload parameter type. The Workflow<Params> generic is the native Cloudflare type from cloudflare:workers.env.IMAGE_PROCESSING fully typed in your Worker fetch handler and anywhere else Env is referenced. You can place it in a dedicated src/env.d.ts file or inline it in your Worker entry as shown in the step above.