mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
070bd0cea9
* [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
Clone of ../nextjs-turbopack
This directory is mostly a clone of the turbopack workbench with nearly everything symlinked to the directory.
The package.json is notably different - it uses --webpack for dev and build modes.
Symlinks
Most files/directories are symlinked to ../nextjs-turbopack:
app/- All files inside are symlinked (not the directory itself)workflows/- Symlinked directoryutil/- Symlinked directorypublic/- Symlinked directoryinstrumentation.ts- Symlinked filepostcss.config.mjs- Symlinked filetsconfig.json- Symlinked fileturbo.json- Symlinked file
A few specific files are NOT symlinked:
app/favicon.ico- Real file (symlink doesn't work with Next.js)app/.well-known/- Generated directory by workflow.gitignore- Real filenext.config.ts- Different configuration (webpack-specific)package.json- Different configuration (--webpackflag)
CI Symlink Resolution
Next.js dev mode doesn't work well with symlinks. In CI, the resolve-symlinks.sh script automatically runs before starting the dev server to replace all symlinks with actual file copies. The script:
- Only runs when
CIenvironment variable is set - Resolves all symlinks in the directory (excluding gitignored files like
node_modules) - Preserves the directory structure while replacing symlinks with real files