First of all you need to create index.html file and src > styles.css file. in styles.css file put these code
@tailwind base;
@tailwind components;
@tailwind utilities;
After that run this on your terminal
npx tailwindcss build src/styles.css -o tailwind.css
Install package.json file
npm init -y
Get some packages with npm install and we’ll put all of these in our dev dependencies
npm install -D tailwindcss postcss autoprefixer vite
After that chagne the package.json file
Now we have to configure tailwind and postcss
npx tailwindcss init -p
Now you can see generated 2 files
- Tailwind config file and
- Postcss config file
Run server
npm run dev or yarn dev
@apply feature uses for removing duplicates
You can use custom colors and custom fonts
Optimizing for Production
npm run build or yarn build