Skip to content
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

use client wrapper on tsup #216

Merged
merged 1 commit into from
Dec 18, 2023
Merged

use client wrapper on tsup #216

merged 1 commit into from
Dec 18, 2023

Conversation

nlkluth
Copy link
Member

@nlkluth nlkluth commented Dec 15, 2023

What

Uses config to add 'use client'; to shared-ui lib

Why

These components are then compatible with RSC/Next

Future

It would be nice if this wasn't an all-or-nothing approach. Per component eluded my attempts. I think it may have to do with the single-file bundle 🤔

References

This is still early on so some better solutions may come about.

See: egoist/tsup#835

Also: https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#advice-for-library-authors which references https://github.com/shuding/react-wrap-balancer/blob/main/tsup.config.ts#L10-L13

Copy link

vercel bot commented Dec 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nextjs-sanity-fe ✅ Ready (Inspect) Visit Preview Dec 15, 2023 6:22pm

@nlkluth nlkluth merged commit bfe528c into main Dec 18, 2023
7 of 8 checks passed
@nlkluth nlkluth deleted the feature/shared-lib-useclient branch December 18, 2023 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants