Skip to main content
This guide shows you how to install Workflow DevKit in a Vite project.
1

Install dependencies

Install the workflow package:
2

Configure Vite

Add the Workflow hot update plugin to your Vite config:
vite.config.ts
The hot update plugin watches for changes to files containing "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/serde imports
    • Custom serialization patterns with Symbol.for('workflow-serialize')

Usage with frameworks

The Vite plugin is used internally by other framework integrations:
  • Astro: Uses workflowHotUpdatePlugin for HMR
  • SvelteKit: Uses workflowHotUpdatePlugin for HMR
  • Nitro: Can optionally use the Vite plugin for development
For framework-specific setup, see the dedicated installation guides.

Example workflow

src/workflows/example.ts

Next steps

Core Concepts

Learn about workflows and steps

API Reference

View the full Vite API reference