There are two folders in the project – the component library and the main app.
I use emotion styled components in component library (CL for future) therefore I have to put ‘use client’ directive on top of every .tsx or css.tsx file that uses emotion (mostly I have separate .tsx file for component markup and logic, and .css.tsx for styles), because it uses createContext.
So I created a new component in CL, put ‘use client’ on top of its .css.tsx styles and packed the whole lib as a .tgz (I have to do it like this temporary). The CL.tgz is used in main app as a dependency, so I run npm i and after compiling stage I receive that .css.tsx without ‘use client’ on top. I don’t have such behaviour for components created in past, despite they are complete the same.
What can be a reason for this?