Question: tsup & styled-jsx
ivan-kleshnin opened this issue Β· comments
Hello, Apal. Thank you for making this library!
Sorry for posting a question here π I'm really interested about your experience with tsup
and styled-jsx
.
I see you've chosen to style your component with raw style
and id
. That's probably a good choice for this particular project.
But what what you do if you had to develop a component library for NextJS?
You'd probably consider styled-jsx
which is NextJS' default styling library, right?!
Unfortunately, styled-jsx
is not compatible with tsup
because it requires a transpilation step with babel
macro/plugin. And tsup
is based on esbuild
which is unrelated to babel
at all.
That was my research, maybe you'll be kind enough to share yours π
It's really unclear how to develop a component library for NextJS with tsup / tsdx / vite / microbundle / etc
... besides configuring Webpack/Rollup from the ground up. Every high-level tool I try is incompatible with styled-jsx
expectations in one way or another.
Hey @ivan-kleshnin,
I have never used tsup
, tsdx
for anything. I'll do some research and let you know here if I find something.
For now, since it is not related to this project, I'm closing the issue.