Files
vercel__workflow/workbench/nextjs-webpack/next.config.ts
Nathan Rajlich 070bd0cea9 [next] make lazyDiscovery the default in withWorkflow (#1805)
* [next] make lazyDiscovery the default in withWorkflow

Flips the default for `workflows.lazyDiscovery` from `false` to `true`
so new projects get deferred workflow discovery automatically on Next.js
versions that support deferred entries (>= 16.2.0-canary.48). Older
versions continue to fall back to eager discovery.

Users can still opt back into eager discovery explicitly by passing
`workflows: { lazyDiscovery: false }`.

Also:
- Remove the now-redundant `lazyDiscovery: true` from the Next.js
  workbench apps.
- Reword the fallback warning for clarity when lazy is the default.
- Update the local-build e2e assertion to match the new warning text.
- Update the withWorkflow docs with the new default.

* [workbench] remove commented 'export default nextConfig' lines
2026-05-22 14:11:34 +00:00

14 lines
320 B
TypeScript

import type { NextConfig } from 'next';
import { withWorkflow } from 'workflow/next';
const nextConfig: NextConfig = {
/* config options here */
// for easier debugging
experimental: {
serverMinification: false,
},
serverExternalPackages: ['@node-rs/xxhash'],
};
export default withWorkflow(nextConfig);