workflow/nuxt
Nuxt module for automatic workflow bundling and runtime configuration.
Nuxt integration for Workflow SDK. The workflow/nuxt entry point's default export is a Nuxt module — it has no callable API. You enable it by adding it to the modules array of your Nuxt config and configure it via the workflow key.
Usage
import { defineNuxtConfig } from "nuxt/config";
export default defineNuxtConfig({
modules: ["workflow/nuxt"],
compatibilityDate: "latest",
});When enabled, the module:
- Registers the
workflow/nitromodule on Nuxt's Nitro server, which transforms"use workflow"and"use step"directives, builds the workflow bundles, and registers the workflow runtime routes under/.well-known/workflow/v1/. - Configures Vite to bundle (rather than externalize) the Workflow SDK packages in SSR mode so workflow code is transformed correctly.
- Enables the
workflowTypeScript plugin by default for IDE IntelliSense. - Uses Nuxt/Nitro's detected
workspaceDirso monorepo apps can import sibling workspace packages without extra workflow config.
Module Options
Options are read from the workflow key of your Nuxt config. The option type is exported as ModuleOptions:
import { defineNuxtConfig } from "nuxt/config";
export default defineNuxtConfig({
modules: ["workflow/nuxt"],
workflow: {
typescriptPlugin: false,
},
compatibilityDate: "latest",
});| Option | Type | Default | Description |
|---|---|---|---|
typescriptPlugin | boolean | true | Adds the workflow TypeScript plugin to the generated tsconfig.json for IDE IntelliSense. Set to false to disable it. |