Files
vercel__workflow/packages/workflow/src/next.cts
Nathan Rajlich c6b630fc07 fix: workflow/next ESM compatibility for .mjs config files (#1653)
Use named export instead of `export =` in the CJS shim so that
Node.js cjs-module-lexer can detect withWorkflow as a named export,
enabling `import { withWorkflow } from 'workflow/next'` in ESM.
2026-04-08 09:55:58 -07:00

5 lines
219 B
TypeScript

// The Next.js plugin needs to support CommonJS usage since
// `next.config.js` using CommonJS syntax is still common.
import nextPlugin = require('@workflow/next');
export const withWorkflow = nextPlugin.withWorkflow;