Skip to content

👌 IMPROVE: add use client directive to support Next.js apps #20

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AntoineBourin
Copy link

@AntoineBourin AntoineBourin commented May 22, 2024

I've made an improvement to add "use client" directive on the top of ScrollSpy component.

This help Next.js users to use and import this component directly from a Server Component.

Rollup by default remove any directive added, so we can add a plugin called rollup-plugin-preserve-directives as described here rollup/rollup#4699.

I've updated the demo-app with the new version. I made some tests on the demo-app without any issues.

Let me know if there is something I missed in the update!

@AntoineBourin AntoineBourin force-pushed the feat/support-nextjs-apps branch from 759403c to 7e7d8f2 Compare May 22, 2024 15:55
@KALrious
Copy link

Validate by me

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