TailwindCss & Emotion 설정때문에 공식문서 들락날락하다가 한 곳에 정리합니다.
yarr add -D tailwindcss postcss autoprefixer
yarn tailwindcss init -p
tailwind.config.js > content에 아래 코드 추가
'./src/components/**/*.{js,ts,jsx,tsx}',
'./src/pages/**/*.{js,ts,jsx,tsx}',
globals.css에 아래코드 추가
@tailwind base
@tailwind components
@tailwind utilities
yarn add @emotion/styled @emotion/react
next.config.js > compiler에 emotion: true 추가
tsconfig.json에 "types": ["@emotion/react/types/css-prop"] 추가
-> 없어도 사용가능하지만 타스에러 해결을 위해 사용