I am serverside rendering a web app. (Using vite) Styled components works for any "native" components but when I import a simple button or so from an external component library I built, it will only pick up the styles for this on the client side.
I noticed that when I added the displayname true option to the babel plugin that only my native components were showing the names on the server.
Logging the initial style tags collected by the server stylesheet also doesn't show any component library classnames.
This leads me to think that somehow my serverside rendering is incapable of picking up the components.
What I tried:
verified that my library doesn't contain the styled or react libraries at build.
set an alias to point to the node_modules/styled
Does anyone have a vague idea what I am missing for this to work?
I am serverside rendering a web app. (Using vite) Styled components works for any "native" components but when I import a simple button or so from an external component library I built, it will only pick up the styles for this on the client side.
I noticed that when I added the displayname true option to the babel plugin that only my native components were showing the names on the server.
Logging the initial style tags collected by the server stylesheet also doesn't show any component library classnames.
This leads me to think that somehow my serverside rendering is incapable of picking up the components.
What I tried:
verified that my library doesn't contain the styled or react libraries at build.
set an alias to point to the node_modules/styled
Does anyone have a vague idea what I am missing for this to work?