-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Yarn berry 설정 #163
chore: Yarn berry 설정 #163
Conversation
- helps manage `@types/*` dependencies automatically - ref: https://github.com/yarnpkg/berry/tree/master/packages/plugin-typescript
- to fix module 'tslib' cannot be found error - ref: ezolenko/rollup-plugin-typescript2#12
- 퍼포먼스가 30초 vs 2초로 너무 파멸적으로 차이나기 때문에 배제했습니다.
@greatSumini 24분전이라...제가 이번에 codecov를 추가하면 npm으로 진행했습니다. ㅠ 이게 먼저 머지 되길!!!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@greatSumini LGTM 👍 추가적으로 위 PR이 merge 되면 별도로 저희가 yarn berry pnp가 잘 동작하도록 하기 위해 해야할 일들이 있다면 같이 알려주시면 좋을 것 같아요!
@@ -0,0 +1,5 @@ | |||
plugins: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@greatSumini nodeLinker
설정 기본 모드가 pnp
인가요? 개인 프로젝트에 적용했을때는 명시했어야 했는 것 같은데(제가 잘 몰라서 그런 걸 수도 있어여 ㅠㅠ), 명시적으로 안해도 잘 돌아가보네요. 👀
https://yarnpkg.com/configuration/yarnrc#nodeLinker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 기본값이 pnp입니다 ㅎㅎ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@greatSumini 옷, 그렇군요. 답변 감사합니다 :)
@jhlee910609 리뷰 감사합니다 ㅎㅎ 더 설정할 것은 없는데, 지금 열려있는 PR들 중 추가로 패키지를 설치한 것이 있다면 충돌이 조금 일어날 수 있겠네요 ㅋㅋ ㅠ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넘깔끔! 정석!
감사합니다 ㅋㅋ
빌드시간 줄어서 설레네요
더 많이 줄것같았는데 🤔ㅎㅎ 지켜봐요!
--
컨플릭 해결 후 바로 머지 고고
Description
묵을만큼 묵은 이슈죠 9번이라니 ㅎㅎ; 무서워서 미루고 있었는데, 막상 해보니 생각보다 간단하네요 😄
기존에 1분 이상 걸리던 CI가 이제 30~40초 내외에 끝납니다. 우왕~ 🥳
작업 내용은 다음과 같습니다.
아래는 저와 같이 yarn berry가 생소한 분들을 위한 짤막한 소개들입니다.
Yarn berry는 v2 이상의 yarn을 부르는 이름입니다!
.pnp.cjs
파일을 이용해 의존성의 위치를 정확히 기록하기 때문에 기존node_modules
의 많은 문제들을 해결할 수 있습니다. (거대한 크기+긴 탐색시간, 외부환경과의 의존, 긴 설치시간, 의존성 끌어올리기, 변경에 대한 검증, ... ).yarn/cache
는node_modules
보다 훨씬 가볍기 때문에 의존성 파일들을 전부 Git에 올릴 수 있습니다. 이를 Zero install이라 합니다. 이러면 git clone시에 의존성을 새로 설치하지 않아도 됩니다. 개꿀이죠!기기 환경에 종속적인 빌드 결과물(패키지)들은
.yarn/unplugged
디렉토리에 저장되며, 이들은.gitignore
에 포함되어 clone시 생성되지 않습니다. 따라서 여기 포함된 패키지들을 사용하는 기능은 install 하지 않으면 작동하지 않습니다. (e.g.yarn build
는 작동하지만yarn lint
는 작동하지 않습니다 ㅋㅋ ㅠ).yarn/unplugged
에 들어가는 패키지가 훨씬 많기 때문에 install을 하더라도 기존보다 훨씬 빠릅니다. 제 기준 현재 6s 980ms 소요되네요! (기존 npm 사용시 49초)조약한 실력으로 세팅해본 Yarn berry입니다 ㅎㅎ ㅠ 조금이라도 이상한 부분은 피드백 부탁드립니다~! 궁금한 점도 환영입니다!
Refs
Help Wanted 👀
Zero install인데 install이 필요하다는 점이 쪼금 찜찜합니다 ㅎㅎ ㅠ
Related Issues
resolve #9
fix #
Checklist ✋
{PR type}: {PR title}
로 맞췄습니다. (type 예시: feat | fix | BREAKING CHANGE | chore | ci | docs | style | refactor | perf | test) (참고: conventional commits)npm run build
,npm run test
)