4c3f59f88d
In short, this PR adds a 3rd layer to the server compiler. This extra layer is for marking the modules when re-entering the server layer from a client component. It is almost identical to the existing server layer and it should have all the same bundling and runtime behaviors, but it's still special because it's not allowed to enter the client layer again from there. Because of that, we create the extra entry for that new layer when the client layer compilation finishes in the `finishModules` phase. The new entry is handled normally as it's in the server layer. But the original module in the client layer will be compiled specially as special no-op exports, and will then be connected via the `callServer` wrapper. fix NEXT-809 ([link](https://linear.app/vercel/issue/NEXT-809)). |
||
---|---|---|
.. | ||
.cargo | ||
.config | ||
crates | ||
native | ||
.rustfmt.toml | ||
Cargo.lock | ||
Cargo.toml | ||
package.json | ||
README.md | ||
rust-toolchain |
@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