38dafa1609
This PR adds proof-of-concept support for the App Router to `next build --experimental-turbo`. It introduces a new way to generate Next.js manifests in Turbopack. Currently, in dev, we pass proxy objects in lieu of manifests, and rely on the entries to know which chunks they need loaded on the client. However, this can't work for builds because it requires control over Next.js rendering, which is not compatible with a Next->Turbo approach. We would need to modify Next.js to support these "lazy" entries. So for now, we add well-known assets (`NextDynamicAsset`, `NextServerComponentAsset`, `NextClientReferenceAsset`, etc.) to the graph, which will get picked up when walking it during asset processing. This lets us collect all possible entries before chunking. This two-step process (collecting all entries, then chunking them) is also a good first step towards production chunking. ## Turbopack updates * https://github.com/vercel/turbo/pull/5494 <!-- Tobias Koppers - add reporting of console messages --> * https://github.com/vercel/turbo/pull/5448 <!-- Alex Kirszenberg - Misc. changes to support App Router build --> |
||
---|---|---|
.. | ||
crates | ||
native | ||
package.json | ||
README.md |
@next/swc
This package is responsible for swc compilation customized for next.js
Development
Run tests
cargo test
# Update snapshots and fixtures for tests
UPDATE=1 cargo test
Format code before submitting code
cargo fmt
Build the binary to integrate with next.js
pnpm build-native