Does the use of tailwind-merge make the component client-only with nextjs? #485
Unanswered
findawayer
asked this question in
Help
Replies: 1 comment
-
Hey @findawayer! 👋 There is nothing in tailwind-merge that should force your components into client-only mode, it is just a bunch of JS functions which aren't using any environment-specific APIs. I'm not sure what's causing it, but maybe the file where you configured tailwind-merge somehow landed in a client-only import path? Meaning that the file is importing another file that hase |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Invoking
twMerge
or a customized version withextendTailwindMerge
both makes the React component client-only, when used within a Next.js application with SSR or SSG setup, apparently.Nextjs server components needs to either:
'use client'
directivetwMerge
I wonder what part of the library could possibly trigger such restrictions, or am I misusing the API? Does someone have similar experiance?
Beta Was this translation helpful? Give feedback.
All reactions