DEV Community

Cover image for Setting up TailwindCSS with SASS in RedwoodJS
Catherine Chen
Catherine Chen

Posted on • Updated on

Setting up TailwindCSS with SASS in RedwoodJS

Here's a quick and easy guide on how to setup TailwindCSS, using the SASS preprocessor, in a new RedwoodJS project.

Requirements

Make sure you have the correct npm / yarn versions installed, the details of which can be found at https://redwoodjs.com/docs/quick-start.

Setting up tailwind and scss

yarn create redwood-app my-app-name
cd my-app-name
yarn rw setup ui tailwind
yarn rw setup webpack
yarn workspace web add -D sass sass-loader
Enter fullscreen mode Exit fullscreen mode

The code above will create a new RedwoodJS project, then set up Tailwind, webpack, and Sass in your project.

Make sure to change index.css to index.scss and update the import in your web/src/App.js file.

Conclusion

That should be it! You're now all set to go :)

Top comments (0)