@workflow/next 5.0.0-beta.19 → 5.0.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -81,27 +81,27 @@ export default withWorkflow(nextConfig, {
|
|
|
81
81
|
| --- | --- | --- | --- |
|
|
82
82
|
| `workflows.lazyDiscovery` | `boolean` | `true` | Defers workflow discovery until files are requested instead of scanning eagerly at startup. Set to `false` to force eager discovery (scanning the project up front). Requires a Next.js version that supports deferred entries; older versions fall back to eager discovery automatically. |
|
|
83
83
|
| `workflows.local.port` | `number` | — | Overrides the `PORT` environment variable for local development. Has no effect when deployed to Vercel. |
|
|
84
|
-
| `workflows.sourcemap` | `boolean \| 'inline' \| 'linked' \| 'external' \| 'both'` | `'inline'` | Controls source maps on generated workflow bundles. See [Source maps](#source-maps) below. |
|
|
84
|
+
| `workflows.sourcemap` | `boolean \| 'inline' \| 'linked' \| 'external' \| 'both'` | `'inline'` (dev) / `false` (prod) | Controls source maps on generated workflow bundles. See [Source maps](#source-maps) below. |
|
|
85
85
|
|
|
86
86
|
### Source maps
|
|
87
87
|
|
|
88
|
-
The step bundle and intermediate workflow bundle default to `'inline'` source maps so
|
|
88
|
+
The step bundle and intermediate workflow bundle default to `'inline'` source maps **in development** — so stack traces from step errors and workflow VM errors point at your source files — and to **`false` in production**, so function bundles stay small. The `sourcemap` option lets you change that:
|
|
89
89
|
|
|
90
90
|
| Value | Behavior |
|
|
91
91
|
| --- | --- |
|
|
92
|
-
| `true` / `'inline'` | Base64-encode the source map and append it to the bundle (default). |
|
|
92
|
+
| `true` / `'inline'` | Base64-encode the source map and append it to the bundle (default in development). |
|
|
93
93
|
| `'linked'` | Write a separate `.map` file and add a `sourceMappingURL` comment. |
|
|
94
94
|
| `'external'` | Write a separate `.map` file without the comment. |
|
|
95
95
|
| `'both'` | Emit both inline and external source maps. |
|
|
96
96
|
| `false` | Omit source maps entirely. |
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
In production, source maps are already off by default. Setting `sourcemap: false` explicitly also turns them off in development, and it drops the inline source map from every bundle while skipping the source-map-support runtime shim on the Vercel step function (the same behavior production gets by default) — the main lever for staying under the Vercel 250MB function size limit. The tradeoff is that workflow VM stack traces will reference generated code (e.g. `evalmachine.<anonymous>`) rather than your source files.
|
|
99
99
|
|
|
100
100
|
<Callout type="info">
|
|
101
101
|
Setting `sourcemap` explicitly affects **all** generated bundles (steps, workflows, webhook). The legacy `WORKFLOW_EMIT_SOURCEMAPS_FOR_DEBUGGING=1` environment variable is narrower — it only toggles source maps on the final workflow wrapper and webhook bundle (which default to off). It continues to work, but new code should use the `sourcemap` option or the `WORKFLOW_SOURCEMAP` environment variable instead.
|
|
102
102
|
</Callout>
|
|
103
103
|
|
|
104
|
-
The option can also be set via the `WORKFLOW_SOURCEMAP` environment variable, which accepts the same values plus `'0'` / `'1'` as aliases for `false` / `true`. Precedence is: explicit config > `WORKFLOW_SOURCEMAP` >
|
|
104
|
+
The option can also be set via the `WORKFLOW_SOURCEMAP` environment variable, which accepts the same values plus `'0'` / `'1'` as aliases for `false` / `true`. Precedence is: explicit config > `WORKFLOW_SOURCEMAP` > the environment-aware default (`'inline'` in development, `false` in production). Development is detected from `next dev` / `NODE_ENV=development`, so the config option and the env var both let you force either behavior in either environment.
|
|
105
105
|
|
|
106
106
|
<Callout type="info">
|
|
107
107
|
The `workflows.local` options only affect local development. When deployed to Vercel, the runtime ignores `local` settings and uses the Vercel world automatically.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workflow/next",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.20",
|
|
4
4
|
"description": "Next.js integration for Workflow SDK",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@swc/core": "1.15.3",
|
|
30
30
|
"semver": "7.7.4",
|
|
31
31
|
"watchpack": "2.5.1",
|
|
32
|
-
"@workflow/builders": "5.0.0-beta.
|
|
33
|
-
"@workflow/core": "5.0.0-beta.
|
|
32
|
+
"@workflow/builders": "5.0.0-beta.20",
|
|
33
|
+
"@workflow/core": "5.0.0-beta.20",
|
|
34
34
|
"@workflow/swc-plugin": "5.0.0-beta.5"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|