rsnext/packages/next-swc
Shu Ding 13e769a301
Improve error message when using per function "use server" in Client Components (#52214)
The current message isn't very clear about `"use server" function` and
`"use server" file`, and there's no link to docs to explain it further:

```
"use server" functions are not allowed in client components. 
You can import them from a "use server" file instead.
```

This PR makes it a bit more verbose:

```
It is not allowed to define inline "use server" annotated Server Actions in Client Components.
You can either mark the entire file by putting "use server" at the top, or pass them down through props from a Server Component.

Read more: https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions#with-client-components
```
2023-07-05 14:34:36 +02:00
..
crates Improve error message when using per function "use server" in Client Components (#52214) 2023-07-05 14:34:36 +02:00
native Extract next-swc Rust code into its own package (#31635) 2021-11-21 12:59:56 +01:00
package.json v13.4.9-canary.2 2023-07-05 10:26:56 +00:00
README.md docs: add readme with development instructions for next/swc (#43834) 2022-12-08 13:38:44 +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