더보기
warn - The `purge`/`content` options have changed in Tailwind CSS v3.0.
warn - Update your configuration file to eliminate this warning.
warn - https://tailwindcss.com/docs/upgrade-guide#configure-content-sources
tailwindcss가 3.0으로 오면서 purge옵션이 content로 옮겨갔기 때문에 뜨는 경고.
기존 tailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
purge: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],
theme: {
extend: {
fontFamily: {
sans: ['Poppins', 'Helvetica', 'sans-serif'],
},
colors: {
base: '#1e1e2d',
},
},
},
plugins: [],
};
수정 tailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],
theme: {
extend: {
fontFamily: {
sans: ['Poppins', 'Helvetica', 'sans-serif'],
},
colors: {
base: '#1e1e2d',
},
},
},
plugins: [],
};
빌드 시에 모든 tailwindcss 클래스들을 포함하는 것이 아니라 해당 경로에서 쓰이는 클래스들만 포함하는 최적화 옵션이다.
728x90
'기타' 카테고리의 다른 글
SOLID 원칙 4분만에 알아보는 좋은 영상 (0) | 2024.03.28 |
---|---|
[암호학] SHA-256은 안전하지 않다. (0) | 2024.02.14 |
오른쪽 Command 키로 한영 변환하기 (0) | 2023.12.31 |
.git pre-commit 훅에서 커밋 메시지 가져오기 (0) | 2023.07.27 |
[Docker] 도커 이미지 디스크 초과 에러 (2) | 2022.02.17 |
댓글