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

nuxt.config.ts
import { defineNuxtConfig } from "nuxt/config";

export default defineNuxtConfig({
  modules: ["workflow/nuxt"], 
  compatibilityDate: "latest",
});

When enabled, the module:

  • Registers the workflow/nitro module 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 workflow TypeScript plugin by default for IDE IntelliSense.
  • Uses Nuxt/Nitro's detected workspaceDir so 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:

nuxt.config.ts
import { defineNuxtConfig } from "nuxt/config";

export default defineNuxtConfig({
  modules: ["workflow/nuxt"],
  workflow: {
    typescriptPlugin: false, 
  },
  compatibilityDate: "latest",
});
OptionTypeDefaultDescription
typescriptPluginbooleantrueAdds the workflow TypeScript plugin to the generated tsconfig.json for IDE IntelliSense. Set to false to disable it.

On this page

Edit this page on GitHub