๐ ๋ชฉ์ฐจ
yarn berry ํ์ฑํ
1. ํ๋ก์ ํธ ์์ฑ
yarn create vite my-app --template react-ts
2. yarn berry ์ด๊ธฐํ
yarn set version berry
3. pnp ๋ฐฉ์ ์ฌ์ฉํ์ฌ ์์กด์ฑ ๊ด๋ฆฌ
- .yarnrc.yml ํ์ผ์์ nodeLinker: pnp ๋ด์ฉ์ ์ถ๊ฐ
- ์ด ์ค์ ์ ํตํด node_modules ํด๋ ์์ด๋ ํจํค์ง๋ฅผ ๊ด๋ฆฌํ ์ ์๋ค.

4. yarn install ํจํค์ง ์ค์น
yarn install # .yarn/cache ์ค์
5. ZipFS ํ๋ฌ๊ทธ์ธ ์ค์น

์ฃผ์ํด์ผ ํ ์ด์ & ํด๊ฒฐ์ฑ
1. ํ์ ์คํฌ๋ฆฝํธ ๊ฒฝ๋ก ์ธ์ ๋ฌธ์
yarn dlx @yarnpkg/sdks vscode #Vs Code SDK ์ค์น
์ด ๋ช ๋ น์ด๋ฅผ ์คํํ๋ฉด .vscode/settings.json ํ์ผ์ด ์์ฑ๋๊ณ , VS Code๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ TypeScript๋ฅผ ์ธ์ํ๊ฒ ๋๋ค.

โ VS Code ์ค์ ์ ์ฉ ๋ฐฉ๋ฒ:
- command + p(Mac) ๋๋ ctrl + p(Windows)
- ">" ์ ๋ ฅ ํ Select TypeScript Version ์ ํ
- Use Workspace Version ํด๋ฆญํ๋ฉด ํ์ ์คํฌ๋ฆฝํธ๊ฐ ์ ์์ ์ผ๋ก ์๋ํ๋ค.
2. zero-install ์ฌ์ฉ ์ .gitignore ์ค์
Yarn์ Zero-Install ๊ธฐ๋ฅ์ ์ฌ์ฉํ๋ฉด .yarn/cache ๋ฑ์ ํด๋๊ฐ .gitignore์ ์ฌ๋ฐ๋ฅด๊ฒ ์ค์ ๋์ด์ผ ํ๋ค. ์๋ ์ค์ ์ถ๊ฐ
.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
https://yarnpkg.com/getting-started/qa
Questions & Answers | Yarn
A list of answers to commonly asked questions.
yarnpkg.com
'React' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
| [React] ํน์ ์๊ฐ๋์๋ง ๋ฒํผ ํ์ฑํ (feat. ๊ณตํด์ผ, ์ฃผ๋ง ์ ์ธ) (0) | 2025.04.11 |
|---|---|
| [React] ์ฑ๋ฅ ์ต์ ํํ๋ ํ useMemo (0) | 2025.04.09 |
| [react] ERROR in ./src/reportWebVitals.js ํจํค์ง ๋๋ฝ (5) | 2024.12.22 |
| [React] SPA ์ฑ๊ธํ์ด์ง ์ ํ๋ฆฌ์ผ์ด์ ์ด๋? ๋ฌด์์ผ๊น. (4) | 2024.09.24 |