mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
0c997ce571
* Warn when serverExternalPackages hides workflow-enabled packages
Add a build-time warning when packages in serverExternalPackages contain
workflow code ('use step', 'use workflow', or serialization classes).
These packages are completely invisible to the workflow compiler when
externalized, causing silent runtime failures.
The warning detects workflow patterns via two methods:
- Fast path: check package.json dependencies for @workflow/serde
- Thorough path: read the package entry file and run pattern detection
Also adds documentation in the serialization guide about the
externalization footgun for 3rd-party packages.
* Auto-remove workflow packages from serverExternalPackages
When workflow-enabled dependencies are externalized in Next.js, compiler transforms are skipped and runtime failures follow. Detect those packages in withWorkflow, remove them from serverExternalPackages for the current build, and keep a generalized externalPackages warning fallback for non-Next builders.
* Address review feedback: add entry-point limitation comment and missing test case
249 B
249 B
@workflow/builders, @workflow/next
| @workflow/builders | @workflow/next |
|---|---|
| patch | patch |
Auto-remove workflow-enabled packages from Next.js serverExternalPackages so they can be transformed, and retain a best-effort externalPackages warning fallback for non-Next builders.