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

fix: 'use client'; banner that was no longer being output #86

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

faiare
Copy link
Contributor

@faiare faiare commented Aug 28, 2024

Currently, due to a rollup issue (egoist/tsup#835 (comment)), the 'use client' directive specified in the banner is being removed. This prevents the Turnstile widget from being used directly in server components, such as those in Next.js.

To circumvent this problem, we can disable the treeshaking option, which prevents rollup from being used.
However, please note that this comes with the trade-off of losing the ability to use treeshaking.

Copy link

codesandbox bot commented Aug 28, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

docs-page bot commented Aug 28, 2024

To view this pull requests documentation preview, visit the following URL:

docs.page/marsidev/react-turnstile~86

Documentation is deployed and generated using docs.page.

Copy link

vercel bot commented Aug 28, 2024

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

Name Status Preview Comments Updated (UTC)
react-turnstile ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 1:56am

@marsidev marsidev merged commit 41306bb into marsidev:main Aug 28, 2024
6 checks passed
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