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: include 'use client' directive in ESM output #724

Merged
merged 1 commit into from
Sep 18, 2024
Merged

Conversation

rpearce
Copy link
Owner

@rpearce rpearce commented Sep 18, 2024

Description

Fixes #623 by including 'use client'; at the top of the exported ESM file.

Testing

  1. Clone the repo and cd into it
  2. git switch fix/use-client
  3. npm i --no-save
  4. npm run build
  5. cat dist/index.js — this should have 'use client'; at the top

Copy link

@karlhorky karlhorky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, code LGTM, thanks!

@rpearce rpearce merged commit e420e9a into main Sep 18, 2024
2 checks passed
@rpearce rpearce deleted the fix/use-client branch September 18, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Next.js App Router error: "Class Component being rendered in a Server Component"
2 participants