mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
c6b630fc07
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.
5 lines
219 B
TypeScript
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;
|