1
Install dependencies
Install the
workflow package:2
Configure Vite
Add the Workflow hot update plugin to your Vite config:The hot update plugin watches for changes to files containing
vite.config.ts
"use workflow" or "use step" directives and triggers rebuilds automatically.3
Enable TypeScript support (Optional)
Add the Workflow TypeScript plugin to your
tsconfig.json for IntelliSense:tsconfig.json
How it works
The Vite integration provides:- Hot module replacement (HMR) support for workflow files
- Automatic rebuild detection when workflow or step files change
- Detection of workflow patterns including:
"use workflow"and"use step"directives@workflow/serdeimports- Custom serialization patterns with
Symbol.for('workflow-serialize')
Usage with frameworks
The Vite plugin is used internally by other framework integrations:- Astro: Uses
workflowHotUpdatePluginfor HMR - SvelteKit: Uses
workflowHotUpdatePluginfor HMR - Nitro: Can optionally use the Vite plugin for development
Example workflow
src/workflows/example.ts
Next steps
Core Concepts
Learn about workflows and steps
API Reference
View the full Vite API reference