ben-rogerson / twin.macro

🦹‍♂️ Twin blends the magic of Tailwind with the flexibility of css-in-js (emotion, styled-components, solid-styled-components, stitches and goober) at build time.
MIT License
7.89k stars 184 forks source link

Tailwind + Styled Components + SWC (TurboPack) + NextJs (no babel) #801

Open MrOxMasTer opened 1 year ago

MrOxMasTer commented 1 year ago

Hello, there was such a problem that I wanted to combine tailwind and styled Components. I think, wow, there's even an instruction, but the problem is that it's for babel. I use Turbopack, but it does not support babel yet https://turbo.build/pack/docs/features/javascript , and I use a completely different way to add to extjs from the official website. https://nextjs.org/docs/app/building-your-application/styling/css-in-js#styled-components How can I combine Styled Components and tailwind without babel?

MrOxMasTer commented 1 year ago

I tried to use this instruction https://github.com/ben-rogerson/twin.examples/tree/master/next-styled-components-typescript

MattCCC commented 1 year ago

It doesn't support SWC (TurboPack) currently. Please refer to: https://github.com/ben-rogerson/twin.macro/discussions/516 for more information.

ojolowoblue commented 1 year ago

Hello, there was such a problem that I wanted to combine tailwind and styled Components. I think, wow, there's even an instruction, but the problem is that it's for babel. I use Turbopack, but it does not support babel yet https://turbo.build/pack/docs/features/javascript , and I use a completely different way to add to extjs from the official website. https://nextjs.org/docs/app/building-your-application/styling/css-in-js#styled-components How can I combine Styled Components and tailwind without babel?

Thanks for sharing this, exactly my problem

DDeme commented 1 year ago

Hello, there was such a problem that I wanted to combine tailwind and styled Components. I think, wow, there's even an instruction, but the problem is that it's for babel. I use Turbopack, but it does not support babel yet https://turbo.build/pack/docs/features/javascript , and I use a completely different way to add to extjs from the official website. https://nextjs.org/docs/app/building-your-application/styling/css-in-js#styled-components How can I combine Styled Components and tailwind without babel?

I would like to also find a way how to run it. This package is awesome.