문제 현상 : yarn build 후 배포한 페이지에서 tailwind.config.js 에 정의한 커스텀 컬러가 적용되지 않음
해결 방법
npx tailwindcss-cli@latest build -o tailwind.css
으로 tailwind 관련 css 파일 생성$ npx tailwindcss-cli@latest build -o tailwind.css tailwindcss 2.0.4 🚀 Building from default CSS... (No input file provided) ✅ Finished in 3.04 s 📦 Size: 4.28MB 💾 Saved to tailwind.css
생성된
tailwind.css
파일을 public 폴더에 복사public/index.html
파일에 head 내에서 tailwind.css 을 로드
<link href="/tailwind.css" rel="stylesheet" />
'React' 카테고리의 다른 글
[React] 모바일에서 input 컴포넌트 클릭 시 자동으로 화면이 확대될 경우 해결 방법 (1) | 2020.04.18 |
---|---|
[React] Github Pages로 리액트 프로젝트 무료 호스팅하기 (0) | 2020.03.31 |
[React] (번역) 2020년 리액트 개발자 로드맵 - 모던 프런트엔드 웹 개발자가 되기 위한 가이드 (0) | 2020.01.27 |