Emotion Styled based UI Library from scratch using Typescript and Rollup to bundle #2797
Unanswered
jayantasamaddar
asked this question in
Q&A
Replies: 1 comment 3 replies
-
What is the exact error you are getting? Can you provide a link to a GitHub repo that demonstrates the problem? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am having a lot of difficulty bundling my component library that I built using @emotion/styled.
The folder structure looks like this -
src
├── components / componentFolder / index.ts (exports particular component)
├── lib / emotion.d.ts (Declarations for theme)
├── types / index.ts (exports all types)
├── index.ts (exports all components and types)
My
rollup.config.js
file looks like this.I keep getting errors on the theme declarations. Has anyone built a working ui library using typescript, @emotion/styled and rollup ? I tried searching, couldn't find any reference. Any example project to look at or any help in this matter is appreciated, including the tsconfig file. My components are tested on storybook and jest. I'm just not able to find the right documentation that shows how to properly bundle an emotion based library. Now I'm stuck here at the config for days, rethinking if I should rewrite the emotion code with SASS as that has plenty of documentation and looks straightforward.
Beta Was this translation helpful? Give feedback.
All reactions