tailwindlabs / discuss

A place to ask questions, get help, or share what you've built with Tailwind CSS.
MIT License
171 stars 9 forks source link

Use with React? #9

Open CMessinides opened 7 years ago

CMessinides commented 7 years ago

Preface: I'm brand new to React and Webpack, so this question is all kinds of naive.

Say I have two components: App and Card. The Webpack entry point is App.js, which imports App.css and Card.js. Card.js imports Card.css. How do I ensure Webpack concatenates the CSS in the correct order? That order being:

  1. The @tailwind preflight directive;
  2. All the component styles;
  3. And the @tailwind utilities directive and any custom utilities.

Thanks for any help. Tailwind looks really, really great. I can't wait to give it a try.

JavierMartinz commented 6 years ago

https://wetainment.com/create-react-app-tailwind-css/