rsnext/packages/next
Jiachi Liu eaaa193751
Always transform styled-jsx for rsc and error with client-only condition (#43386)
Previously we stopped transform css-in-js libraries for RSC server layer because it's not encouraged to use them in server components but client components for saving the bytes of RSC payload.
We can detect styled-jsx usage on RSC server layer and error with `client-only` condition, but since it was not transformed properly so it's not erroring properly.

In the future, once styled-components and emotion have `client-only` depepdency integrated so we can re-enable the transform for them on server layer

## Bug

- [ ] 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)
2022-11-26 00:36:18 +00:00
..
bin Add event for dev process stop (#42255) 2022-10-31 12:19:22 -07:00
build Always transform styled-jsx for rsc and error with client-only condition (#43386) 2022-11-26 00:36:18 +00:00
bundles refactor: split up CONTRIBUTING.md (#40515) 2022-09-16 14:54:58 -07:00
cli Fix middleware not executed when pages directory is empty (#43205) 2022-11-21 15:37:58 -08:00
client Add ref forwarding for next/image (#43193) 2022-11-25 15:08:50 +00:00
compat next/compat/router (#42502) 2022-11-07 18:16:28 +00:00
compiled Update precompiled react (#43288) 2022-11-23 15:57:38 +00:00
export Replace global with globalThis (#42627) 2022-11-08 14:45:30 +01:00
font @next/font return types (#42753) 2022-11-10 08:56:27 -08:00
image-types
legacy BREAKING CHANGE: Rename next/image to next/legacy/image & rename next/future/image to next/image (#41399) 2022-10-14 01:59:22 +00:00
lib docs: add error link when missing appDir: true (#43293) 2022-11-23 12:07:14 -08:00
pages fix(ts): relax AppProps to not require generic (#41264) 2022-10-07 14:59:32 -07:00
server Resolve RSC / HTML rendering errors in error overlay (#43332) 2022-11-25 13:06:42 +01:00
shared/lib Remove unstable_revalidate (#43119) 2022-11-19 15:54:19 -08:00
telemetry Track page counts during builds (#42766) 2022-11-10 17:47:33 -08:00
trace Update @types/node to 14.14.31 (#41634) 2022-10-22 11:19:14 -07:00
types Update precompiled react to next channel (#41708) 2022-10-24 00:31:52 -07:00
amp.d.ts
amp.js Alias all client, shared, pages dist assets for esm (#41034) 2022-09-29 21:24:04 +00:00
app.d.ts
app.js Alias all client, shared, pages dist assets for esm (#41034) 2022-09-29 21:24:04 +00:00
babel.d.ts
babel.js
client.d.ts
client.js Alias all client, shared, pages dist assets for esm (#41034) 2022-09-29 21:24:04 +00:00
config.d.ts
config.js Alias all client, shared, pages dist assets for esm (#41034) 2022-09-29 21:24:04 +00:00
constants.d.ts
constants.js Alias all client, shared, pages dist assets for esm (#41034) 2022-09-29 21:24:04 +00:00
document.d.ts
document.js Alias all client, shared, pages dist assets for esm (#41034) 2022-09-29 21:24:04 +00:00
dynamic.d.ts
dynamic.js Alias all client, shared, pages dist assets for esm (#41034) 2022-09-29 21:24:04 +00:00
error.d.ts
error.js Alias all client, shared, pages dist assets for esm (#41034) 2022-09-29 21:24:04 +00:00
head.d.ts
head.js Alias all client, shared, pages dist assets for esm (#41034) 2022-09-29 21:24:04 +00:00
headers.d.ts Add exports for new router (#41368) 2022-10-13 09:13:39 +00:00
headers.js Add exports for new router (#41368) 2022-10-13 09:13:39 +00:00
image.d.ts
image.js Alias all client, shared, pages dist assets for esm (#41034) 2022-09-29 21:24:04 +00:00
index.d.ts typing: upgrade styled-jsx to remove workaround in build script (#39408) 2022-08-09 17:10:33 +00:00
jest.d.ts
jest.js fix(#36534): enable interopClientDefaultExport for next/jest (#36824) 2022-05-11 13:13:13 -05:00
license.md
link.d.ts
link.js Alias all client, shared, pages dist assets for esm (#41034) 2022-09-29 21:24:04 +00:00
navigation.d.ts Add exports for new router (#41368) 2022-10-13 09:13:39 +00:00
navigation.js Add exports for new router (#41368) 2022-10-13 09:13:39 +00:00
package.json v13.0.6-canary.1 2022-11-25 13:31:08 +01:00
README.md docs(README): next.js logo with dark mode (#40223) 2022-09-13 16:39:52 +02:00
router.d.ts
router.js Alias all client, shared, pages dist assets for esm (#41034) 2022-09-29 21:24:04 +00:00
script.d.ts
script.js Alias next public api to esm on edge runtime (#42709) 2022-11-09 19:20:32 -08:00
server.d.ts Update @types/node to 14.14.31 (#41634) 2022-10-22 11:19:14 -07:00
server.js refactor: add named export in next/server (#39381) 2022-08-07 16:17:15 +00:00
taskfile-ncc.js
taskfile-swc.js Improve RSC plugin to provide better errors (#42435) 2022-11-23 17:26:38 -08:00
taskfile.js Resolve RSC / HTML rendering errors in error overlay (#43332) 2022-11-25 13:06:42 +01:00
tsconfig.json next/compat/router (#42502) 2022-11-07 18:16:28 +00:00

Next.js

Getting Started

Visit https://nextjs.org/learn to get started with Next.js.

Documentation

Visit https://nextjs.org/docs to view the full documentation.

Who is using Next.js?

Next.js is used by the world's leading companies. Check out the Next.js Showcase to learn more.

Community

The Next.js community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects.

To chat with other community members you can join the Next.js Discord.

Our Code of Conduct applies to all Next.js community channels.

Contributing

Please see our contributing.md.

Good First Issues

We have a list of good first issues that contain bugs that have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process.

Authors

Security

If you believe you have found a security vulnerability in Next.js, we encourage you to responsibly disclose this and not open a public issue. We will investigate all legitimate reports. Email security@vercel.com to disclose any security vulnerabilities.

https://vercel.com/security