- npm init -y
- npm install tailwindcss postcss-cli autoprefixer
- create css/tailwind.css file and pest this codes
@tailwind base;
@tailwind components;
@tailwind utilities;
-
Run npx tailwindcss init
-
create postcss.config.js file in the root folder pest
module.exports = {
plugins: [
// ...
require('tailwindcss'),
require('autoprefixer'),
// ...
]
}
- change the scripe in the packege.json
"scripts": {
"build": "postcss css/tailwind.css -o public/build/tailwind.css "
},
- run npm build
mx-auto, max-w-md, sm:max-w-xl