Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- pm2
- setInterval clear
- 서버동기화
- transfer
- 1883
- pm2 확인
- setInterval 외부 정지
- timepicker
- pm2 설치
- listener 1883
- mosquitto
- c# datagridview 데이터 넣기
- datagridview 직접입력
- AntDesign
- 데이터테이블 데이터 넣기
- pm2 상태 확인
- mosquitto.conf
- html #select #option #multiple
- setInterval 정지
- invalid data
- map이 undefined가 뜰 때
- setInterval 중지
- Replication
- allow_anonymouse
- DatePicker
- 맥 어드레스
- DataGridView 직접 입력
- 공인IP
- pm2 시작
- mySQL_Replication
Archives
- Today
- Total
개발 노트
vite + react 에 tailwind.css + antd 적용하기 본문
1. react 프로젝트 만들기
npm create vite@latest . -- --template react
. 대신 원하는 프로젝트 명 을 가진 directory 생성가능
latest 대신 원하는 버전 지정
react 대신 vue나 기타 template 지정
2. tailwind 설치 공식문서>> https://tailwindcss.com/docs/installation/using-vite
npm i tailwindcss @tailwindcss/vite
3. vite.config.js 설정
import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [
react(),
tailwindcss(),
],
})
4. src/App.css 설정
@import "tailwindcss";
5. src/App.jsx 에 App.css import
import { useState } from 'react'
import './App.css'
function App() {
return (
<>
<h1 className="text-red-500 text-3xl font-bold underline">
Hello world!
</h1>
</>
)
}
export default App
6. vite port변경 server default > 5173/ preview default > 4173 (필요 시) >>>> https://ko.vite.dev/config/preview-options.html#preview-port
import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [
react(),
tailwindcss(),
],
server: {
port: 3000
},
preview: {
port: 8080
}
})
7. antd설치
npm i antd
8. tailwind + antd 적용하기 App.css 적용 전에 antd css 먼저 적용
@import 'antd/dist/reset.css';
@import "tailwindcss";
'프로그래밍 > CSS' 카테고리의 다른 글
CSS 최신문법(where/is/has/not) (0) | 2025.01.14 |
---|---|
scss - & (0) | 2023.09.04 |
간격에 대해 (0) | 2023.08.31 |
SCSS - $변수명 (0) | 2023.08.30 |
Ant Design CSS 변경하기 (0) | 2023.06.14 |