c648f9d413
When `appDir` is enabled, `next/dynamic` with `ssr: false` didn't get correctly compiled with swc. The `server_components` condition in next_dynamic transform should respect to the server components compilation, but it was accidently turned on when server components is enabled. This PR fixes it that only turn on the flag when it's in server components compilation (when `is_server` option is `true`) reported by @MaxLeiter ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> |
||
---|---|---|
.. | ||
.cargo | ||
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