rsnext/packages/next-swc
Jiachi Liu c648f9d413
Fix next/dynamic non ssr in pages when appDir is enabled (#45066)
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>
2023-01-20 00:25:46 +01:00
..
.cargo chore: Update swc_core to v0.28.10 (#41016) 2022-09-29 14:09:20 +00:00
crates Fix next/dynamic non ssr in pages when appDir is enabled (#45066) 2023-01-20 00:25:46 +01:00
native Extract next-swc Rust code into its own package (#31635) 2021-11-21 12:59:56 +01:00
.rustfmt.toml Extract next-swc Rust code into its own package (#31635) 2021-11-21 12:59:56 +01:00
Cargo.lock Revert "chore: Update swc_core to v0.53.0" (#44760) 2023-01-10 16:49:32 -08:00
Cargo.toml chore: Update swc_core to v0.28.20 (#41153) 2022-10-04 16:16:11 +02:00
package.json v13.1.3-canary.5 2023-01-18 17:03:39 -08:00
README.md docs: add readme with development instructions for next/swc (#43834) 2022-12-08 13:38:44 +01:00
rust-toolchain build(next-swc): update turbopack to latest (#42733) 2022-11-10 11:52:48 +01:00

@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