Download the zip file and extract it at the root of your project.
Run npm install
to install the dependencies. (If you already have a package.json
, just run npm install autoprefixer laravel-mix postcss tailwindcss --dev
.)
Run npx tailwind init
to generate a default TailwindCSS config file.
Inside this config file, configure PurgeCSS to scan relevant files. Example:
module.exports = {
purge: [
'./resources/**/*.blade.php'
]
}
Configure the paths in webpack.mix.js
.
Run npm run watch
while coding, npm run prod
to compile for production.