-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Feature] wowds-ui 디자인시스템 번들러 최적화, 디자인 시스템 배포 #4
Conversation
packages/wow-ui/package.json
Outdated
"@chromatic-com/storybook": "^1.3.3", | ||
"@loadable/component": "^5.16.4", |
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.
동적 import만 사용해도 코드 스플리팅이 되는 걸로 알고 있긴 한데, 혹시 loadable component를 사용한 이유가 있을까요?
@eugene028 위에서 preserveModules라는 옵션을 활성화해주셔서 이 문제가 해결되기는 했는데, 방법이 두 가지인 것 같습니다.
그래서 롤업 공식 문서를 참고해서 어떤 방법이 더 좋은지 고민을 해봤습니다. 두 번째 방식입니다. 그래서 결론은, 첫 번째 방식을 사용해서 cjs 모듈에도 적용해보는 게 어떤지 건의드립니다! |
🎉 변경 사항
wowds-ui
wowds-icons
wowds-tokens
index.js
로 묶여 말려 들어가길래, 모듈 단위로 번들러를 만들 수 있도록 찢는 작업을 진행했어요!(작업 전)
(작업 후)

🙏 여기는 꼭 봐주세요!
commonjs가 트리쉐이킹이 잘 안된다고 해서 일단은 Rollup.config.cjs파일에 esm 버전 관련 트리쉐이킹 처리만 해둔 상태예요.
필요하다고 생각되면 cjs도 트리쉐이킹 세팅을 해둘게용.