tailwind vite 1

tailwind vite

npm install -D tailwindcss@latest postcss@latest autoprefixer@latest

npx tailwindcss init -p

# add ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'] to purge in tailwind.config.js

echo -e "@tailwind base; \n@tailwind components; \n@tailwind utilities;" >> src/index.css

# add index.css file in src/main.js
# import './index.css'

Here is what the above code is Doing:
1. Install the latest version of Tailwind CSS and its peer dependencies.
2. Create a minimal Tailwind CSS configuration file.
3. Add the Tailwind directives to your CSS file.
4. Import the CSS file in your application.

Similar Posts