Skip to content

Posts tagged purgecss

Posts under this tag. Back to all posts when you want the full stream.

Posts

@latest_post

How to add Tailwind CSS to Vue.js

Basic setup

This guide builds on Quickstart guide for a new Vue.js project. 

We are going to setup Tailwind CSS  + PurgeCSS  to get a very lean CSS system that'll only include what we actually use from Tailwind.

Install dependencies

Shell command
yarn add tailwindcss
yarn add --dev @fullhuman/postcss-purgecss

Generate Tailwind CSS config file

Create a ready-to-be-extended tailwind.config.js file:

Shell command
npx tailwind init # --full

If you want a full config file, you can remove the # and pass the --full flag to the command above.