When a page is marked as "use client". The result of the transform process on code is missing variables? I'm guessing at this point. Therefore it leads to a crash due to an undefined variable.
Expected behavior
Whether a page has "use client" or not. A component with compound properties should work fine.
Steps to reproduce
Clone repo: https://github.com/paulm17/raikou_pigmentcss pnpm i pnpm run dev
The app will crash with a stack trace:
⨯ unhandledRejection: EvalError: Cannot set properties of null (setting 'displayName')
This only happens when the page is a client component.
Remove: https://github.com/paulm17/raikou_pigmentcss/blob/main/apps/web/app/page.tsx#L1
and re-run and the issue goes away.
Current behavior
When a page is marked as "use client". The result of the transform process on code is missing variables? I'm guessing at this point. Therefore it leads to a crash due to an undefined variable.
Expected behavior
Whether a page has "use client" or not. A component with compound properties should work fine.
Context
Using pigment-css with a component library.
Your environment
No response
Search keywords: Cannot set properties of null