Vite 사용자를 위한 테일윈드 설치

https://tailwindcss.com/docs/guides/vite

Install Tailwind CSS with Vue 3 and Vite - Tailwind CSS

순서

프로젝트 개발 디펜던시에 설치

(프로젝트 루트 경로에서 터미널을 열어 수행)

npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

tailwind.config.js 파일이 생김.

다음으로 붙여 넣기

module.exports = {
  content: [
    "./index.html",
    "./src/**/*.{js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

index.css 다시 쓰기

@tailwind base;
@tailwind components;
@tailwind utilities;

이제 알아서 테일윈드 적용됨.

주의