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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work with CodeSandbox React template

adamerose opened this issue · comments

What steps are needed to get twin.macro working with the default CodeSandbox React template?

What I tried was:

  1. Fork the React template
  2. Install twin.macro and tailwindcss as dependencies
  3. Add an empty file called empty.js in the project root as described here #9 (comment), and refresh the page
  4. It gets stuck forever on Transpiling Modules...

I remember adding that strange empty.js file in CodeSandbox too.
Btw none of that nonsense since moving the default twin example to StackBlitz 🤌

In CodeSandbox the default template uses react-scripts aka create-react-app so check out either emotion setup instructions. or styled-components setup instructions..