-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
State of issuerLayer=="rsc"
for the library authors
#64244
Comments
Maybe using package.json conditions would solve this and be more universal across RSC frameworks? There’s a “react-server” import/export condition for RSC 😃 Would that help there? |
Good point. That makes sense. |
Yeah definitely don't add a webpack plugin for this as it'll break in the future 👍 The |
Is this |
Yes, it was supported from the first release, that’s part of React spec 😃 |
Thanks for your answers, we will go this way. |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What is the improvement or update you wish to see?
Hello NextJs team,
I'm a maintainer of the Lingui https://lingui.dev/ which is i18n library with a focus on DX.
Recently we started a discussion how to support RSC without lacking a DX for our users and found that we need a possibility to resolve our
Trans
component to a different implementation depending on the issuer layer.I ended up with my custom resolver for webpack which looks like this:
However,
request.context.issuerLayer === 'rsc'
is an internal Next.js implementation detail, and I feel that using it in our library may break at any time.Related issues:
lingui/js-lingui#1698
lingui/js-lingui#1903
Lingui with RSC PoC: https://github.com/thekip/nextjs-lingui-rsc-poc/blob/main/next.config.js
The text was updated successfully, but these errors were encountered: