Styled components in component library #3736
Unanswered
mrcrazylee
asked this question in
Q&A
Replies: 2 comments
-
|
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
-
|
Did you figure it out? I have the same issue @mrcrazylee |
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
Uh oh!
There was an error while loading. Please reload this page.
-
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-componentsfor styling. In this project,styled-componentsis listed as apeerDependencyinpackage.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-componentsin 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-componentssettings from the.babelrcfrom the consuming project?Does anybody know of any examples of similar setups?
Beta Was this translation helpful? Give feedback.
All reactions