๋ฐ์ํ
# ์
๋ฐ์ดํธ (25.03.04 ๊ธฐ์ค)
- Tailwindcss 4.0์ React 19 ๊ธฐ์ค์ผ๋ก ์ ๊ณต๋จ: ํด๋น ํ๊ฒฝ์ ๋ง์ถ ๋ค์ npx shadcn@canary init ํตํด ์ด๊ธฐํ ๊ฐ๋ฅ (๊ด๋ จ ๋งํฌ: https://github.com/shadcn-ui/ui/issues/6585)
- ๋ง์ฝ React 18์ ๊ธฐ์ค์ผ๋ก ์งํ์ด ํ์ํ ๊ฒฝ์ฐ์๋ ์๋์ ๊ฐ์ migration ์ ์ฐจ (#์งํ ๋ฐฉ๋ฒ) ๋ฅผ ๊ฑฐ์น๋ฉด ๋ฉ๋๋ค.
# ํ๊ฒฝ
- React + Bun + Vite + TypeScript
# ํ์: Shadcn UI Installation ์ค bunx --bun shadcn@latest init ์คํ ์ ์ค๋ฅ ๋ฐ์ (tailwind.config.js ํ์ผ์ด ์์์)
PS C:\olive\app> bunx --bun shadcn@latest init
โ Preflight checks.
โ Verifying framework.
No Tailwind CSS configuration found at C:\olive\app
It is likely you do not have Tailwind CSS installed or have an invalid configuration.
Install Tailwind CSS then try again.
Visit https://tailwindcss.com/docs/guides/vite to get started.
# ์์ธ
- Shadcn UI ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋ฌธ์ ์์ฑ ์ Tailwindcss ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์ธํ ๋์๋ ์ต์ ๋ฒ์ ์ 3.x ๊ธฐ์ค (tailwindcss@latest = 3.x)
- ์ต๊ทผ Tailwindcss ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ๋ฒ์ ์ด 3.x -> 4.0์ผ๋ก ์ ๊ทธ๋ ์ด๋ ๋๋ฉด์ ๋ฒ์ ๊ฐ ์ถฉ๋ ๋ฐ์
- ๋ฐ๋ผ์ ํ์ฌ Shadcn UI ๊ณต์ ํํ์ด์ง์์ ์ ๊ณตํ๋ Installation๋๋ก ์งํํ๋ฉด ์ ๋จ. ์๋ ๋ด์ฉ ๊ทธ๋๋ก ์งํํ์ธ์.
# ์งํ ๋ฐฉ๋ฒ
- TailWindCSS v3 ๋ฒ์ ์ผ๋ก ์ค์น: bun add -D tailwindcss@3.4.0 postcss autoprefixer
bun add v1.2.0 (b0c5a765)
installed tailwindcss@3.4.0 with binaries:
- tailwind
- tailwindcss
installed postcss@8.5.1
installed autoprefixer@10.4.20 with binaries:
- autoprefixer
39 packages installed [3.65s]
- TailWindCSS v3 ๋ฒ์ ์ผ๋ก ์ด๊ธฐํ: bunx --bun tailwindcss init -p
Created Tailwind CSS config file: tailwind.config.js
Created PostCSS config file: postcss.config.js
- Shadcn UI ์ด๊ธฐํ: bunx --bun shadcn@latest init
โ Preflight checks.
โ Verifying framework. Found Vite.
โ Validating Tailwind CSS.
โ Validating import alias.
√ Which style would you like to use? » New York
√ Which color would you like to use as the base color? » Zinc
√ Would you like to use CSS variables for theming? ... no / yes
โ Writing components.json.
โ Checking registry.
โ Updating tailwind.config.js
โ Updating src\index.css
โ Installing dependencies.
- src\lib\utils.ts
Success! Project initialization completed.
You may now add components.
- Shadcn UI Components ์ ์ฒด ์ถ๊ฐ: bunx --bun shadcn@latest add --all
โ Checking registry.
โ Updating tailwind.config.js
โ Updating src\index.css
โ Installing dependencies.
- src\components\ui\accordion.tsx
- src\components\ui\alert-dialog.tsx
- src\components\ui\aspect-ratio.tsx
- src\components\ui\avatar.tsx
- src\components\ui\badge.tsx
- src\components\ui\breadcrumb.tsx
- src\components\ui\calendar.tsx
- src\components\ui\card.tsx
- src\components\ui\carousel.tsx
- src\components\ui\chart.tsx
- src\components\ui\checkbox.tsx
- src\components\ui\collapsible.tsx
- src\components\ui\command.tsx
- src\components\ui\dialog.tsx
- src\components\ui\context-menu.tsx
- src\components\ui\drawer.tsx
- src\components\ui\dropdown-menu.tsx
- src\components\ui\form.tsx
- src\components\ui\hover-card.tsx
- src\components\ui\input-otp.tsx
- src\components\ui\menubar.tsx
- src\components\ui\navigation-menu.tsx
- src\components\ui\pagination.tsx
- src\components\ui\popover.tsx
- src\components\ui\progress.tsx
- src\components\ui\radio-group.tsx
- src\components\ui\resizable.tsx
- src\components\ui\scroll-area.tsx
- src\components\ui\select.tsx
- src\components\ui\slider.tsx
- src\components\ui\sonner.tsx
- src\components\ui\switch.tsx
- src\components\ui\table.tsx
- src\components\ui\toast.tsx
- src\hooks\use-toast.ts
- src\components\ui\toaster.tsx
- src\components\ui\toggle.tsx
- src\components\ui\toggle-group.tsx
- src\components\ui\alert.tsx
- src\components\ui\button.tsx
- src\components\ui\label.tsx
- src\components\ui\input.tsx
- src\components\ui\separator.tsx
- src\components\ui\sheet.tsx
- src\components\ui\sidebar.tsx
- src\components\ui\tooltip.tsx
- src\hooks\use-mobile.tsx
- src\components\ui\skeleton.tsx
- src\components\ui\tabs.tsx
- src\components\ui\textarea.tsx
- TailWindCSS 4.0 Migration: npx @tailwindcss/upgrade@next
- ์ฃผ์: bunx --bun @tailwindcss/upgrade@next ์คํํ ๊ฒฝ์ฐ, ์๋์ ๊ฐ์ ์ค๋ฅ๊ฐ ๋ฐ์๋๋ค -> ์ ๋ช
๋ น์ด๋ฅผ ์คํํด์ฃผ๋ฉด ์ค๋ฅ๊ฐ ๋๋ ๋ฐ์ํ์ง ์๋๋ค.
- โ๏ธ tree-sitter [1/2] error: could not determine executable to run for package exec
- error: install script from "tree-sitter-typescript" exited with 1
- ์ฃผ์: bunx --bun @tailwindcss/upgrade@next ์คํํ ๊ฒฝ์ฐ, ์๋์ ๊ฐ์ ์ค๋ฅ๊ฐ ๋ฐ์๋๋ค -> ์ ๋ช
๋ น์ด๋ฅผ ์คํํด์ฃผ๋ฉด ์ค๋ฅ๊ฐ ๋๋ ๋ฐ์ํ์ง ์๋๋ค.
# ์ฐธ๊ณ (deprecated)
์ด์ : https://github.com/shadcn-ui/ui/issues/6446 ํ์ฌ ์งํ ์ค์ธ ์ฌํญ์ด๋ฉฐ (4์ผ ์ ์ ๋ฐ์ดํธ), ์ ๋ด์ฉ์ ์ธ์ ๋ ์ง ๋ณ๊ฒฝ๋ ์ ์์React 18 + Tailwind v3, React 19 + Tailwind v4 ๋ฑ ๋ฒ์ ๋ณ ํธํ์ ๋ฌธ์ ๊ฐ ์์ด ์์ ์งํ์ค์ด๋ผ๋ ๋ด์ฉ์ ํ์ธํ ์ ์์์(์์ ํ ๋ด์ฉ์ด ๋ง๋ค๊ณ ๋..) ๋น์ฅ ์ด๊ธฐ ์ธํ ์ ์งํํ์๋ ๊ฒฝ์ฐ ์ฐธ๊ณ ํ์๊ธธ ๋ฐ๋
๋ฐ์ํ
'๐จ Front-End' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[ํฌ๋กฌ ๊ฐ๋ฐ์ ๋๊ตฌ] ์ ์ฒด ๊ฒ์(์ ์ญ ๊ฒ์)ํ๋ ๋ฐฉ๋ฒ (0) | 2020.01.20 |
---|---|
[Debug] ํฌ๋กฌ ๊ฐ๋ฐ์ ๋๊ตฌ์์ Device ๋ชจ๋์ ๋ง์ฐ์ค ์ปค์๊ฐ ๋ณด์ด์ง ์๋ ๊ฒฝ์ฐ (2) | 2017.09.11 |
[SheetJS] ํ๊ธ ๊นจ์ง ๋ฌธ์ (0) | 2017.07.19 |
[SheetJS] ๊ฐ์ฒด๊ฐ 'slice' ์์ฑ์ด๋ ๋ฉ์๋๋ฅผ ์ง์ํ์ง ์์ต๋๋ค. (0) | 2017.07.19 |
[SheetJS] ์์ (1) | 2017.07.10 |