리액트/앤트디(Antd)
[Antd] 스타일이 안들어오는 경우 & craco로 스타일 적용
임고미
2021. 7. 22. 11:08
728x90
300x250
1. 앤트디 적용했는데 스타일이 안들어오는 문제를 확인했다..
import 'antd/dist/antd.css';
했더니 스타일이 적용되긴 되었다.
2. 커스텀하려고 craco 로 세팅
다운 받아야하는 라이브러리 2가지는
"@craco/craco": "^5.5.0", "craco-antd": "^1.19.0", |
버전을 함께 올려놓은 이유는, craco-antd를 사용하기 위해선 caraco를 로드해야하는데
craco 버전 이슈가 있어서 5.5.0으로 세팅하였다.
package.json의 스크립트 부분을 수정해 줘야합니다.
"scripts": {
"start": "craco start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
+
craco antd를 설치하는 과정에서 npm install이 안되는 문제를 발견했다..
해결 : --save --legacy-peer-deps 을 붙여서 로드할것
https://iancoding.tistory.com/154
[오류해결] npm install 설치시 npm ERR! code ERESOLVE
npm install react-paypal-express-checkout --save npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree paypal 이용하려고 설치하려고 하자 위와 같이 오류가 났다. 해결방법 npm i..
iancoding.tistory.com
728x90
300x250