diff --git a/.changeset/fix-next-esm-compat.md b/.changeset/fix-next-esm-compat.md new file mode 100644 index 0000000000..47c424643b --- /dev/null +++ b/.changeset/fix-next-esm-compat.md @@ -0,0 +1,5 @@ +--- +"workflow": patch +--- + +Fix `workflow/next` ESM compatibility for `next.config.mjs` files diff --git a/packages/workflow/src/next.cts b/packages/workflow/src/next.cts index e7ccd7a361..6923a6f2eb 100644 --- a/packages/workflow/src/next.cts +++ b/packages/workflow/src/next.cts @@ -1,4 +1,4 @@ // 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 = nextPlugin; +export const withWorkflow = nextPlugin.withWorkflow;