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://redw…


This content originally appeared on DEV Community and was authored by Catherine Chen

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

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 :)


This content originally appeared on DEV Community and was authored by Catherine Chen


Print Share Comment Cite Upload Translate Updates
APA

Catherine Chen | Sciencx (2022-03-26T00:51:04+00:00) Setting up TailwindCSS with SASS in RedwoodJS. Retrieved from https://www.scien.cx/2022/03/26/setting-up-tailwindcss-with-sass-in-redwoodjs/

MLA
" » Setting up TailwindCSS with SASS in RedwoodJS." Catherine Chen | Sciencx - Saturday March 26, 2022, https://www.scien.cx/2022/03/26/setting-up-tailwindcss-with-sass-in-redwoodjs/
HARVARD
Catherine Chen | Sciencx Saturday March 26, 2022 » Setting up TailwindCSS with SASS in RedwoodJS., viewed ,<https://www.scien.cx/2022/03/26/setting-up-tailwindcss-with-sass-in-redwoodjs/>
VANCOUVER
Catherine Chen | Sciencx - » Setting up TailwindCSS with SASS in RedwoodJS. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/03/26/setting-up-tailwindcss-with-sass-in-redwoodjs/
CHICAGO
" » Setting up TailwindCSS with SASS in RedwoodJS." Catherine Chen | Sciencx - Accessed . https://www.scien.cx/2022/03/26/setting-up-tailwindcss-with-sass-in-redwoodjs/
IEEE
" » Setting up TailwindCSS with SASS in RedwoodJS." Catherine Chen | Sciencx [Online]. Available: https://www.scien.cx/2022/03/26/setting-up-tailwindcss-with-sass-in-redwoodjs/. [Accessed: ]
rf:citation
» Setting up TailwindCSS with SASS in RedwoodJS | Catherine Chen | Sciencx | https://www.scien.cx/2022/03/26/setting-up-tailwindcss-with-sass-in-redwoodjs/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.