Files
vercel__workflow/.changeset/node-module-error-cross-file-dce.md
Nathan Rajlich 78301695ea fix(builders): avoid false-positive node-module errors for step-only usage in shared modules (#1821)
The workflow-node-module-error plugin records violations in onResolve, which
runs before esbuild's tree-shaker. A shared module with both a workflow-safe
export and a step-only export that imports node:* would be flagged even when
the workflow never reached the step-only export.

Mark node:/bun: imports as sideEffects: false so esbuild can tree-shake them
when unused in surviving code, enable metafile, and filter recorded violations
in onEnd against outputs[].imports so only builtins that actually survive in
the emitted bundle are reported.

Fixes #1817
2026-05-01 17:57:56 +00:00

131 B

@workflow/builders
@workflow/builders
patch

Fix false-positive workflow-node-module-error for step-only Node.js usage in shared modules