Styled components in component library #3736
Unanswered
mrcrazylee
asked this question in
Q&A
Replies: 1 comment
-
I don't think is specifically a Nextjs problem. I have had the same problem in non next applications. I am sorry but I don't have a solution to this. But keeping an eye on this |
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
-
Hi
I've searched long and far, but could not find much information about this topic.
I have a component library that is distributed through an npm package. This library uses
styled-components
for styling. In this project,styled-components
is listed as apeerDependency
inpackage.json
.The component library is then consumed in a separate NextJS project. Currently I am running into issues regarding SSR, using the
babel-plugin-styled-components
in the NextJS project.The problems I am running into:
babel-plugin-styled-components
, I see it only happening for styled components from the NextJS project. Class names from components from the component library are not affected.My main question is;
Is it possible for the component library package to inherit the
babel-plugin-styled-components
settings from the.babelrc
from the consuming project?Does anybody know of any examples of similar setups?
Beta Was this translation helpful? Give feedback.
All reactions