-
Notifications
You must be signed in to change notification settings - Fork 46
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
Use Parcel as bundler instead of Rollup #1097
Use Parcel as bundler instead of Rollup #1097
Conversation
|
본문에 이어 개인적인 의견은 코멘트로 달아두겠습니다.
|
Chromatic Report🚀 Congratulations! Your build was successful! |
Update 2023/01/06
|
…cognize project root
#1424 에서 rollup v3를 사용하여 개선되었습니다 |
Self Checklist
CODEOWNERS
file.Related Issue
Summary
@channel.io/bezier-react
라이브러리 번들러를 Rollup에서 Parcel로 변경합니다.Details
📦 Introduce Parcel
bezier-react
번들링에서 필요로 하는 모든 것을 지원합니다..d.ts
) 생성: 지원합니다.import().then
등) 문법을 Rollup에서는 잡지 못하지만(Tree shaking in dynamic modules rollup/rollup#3447 ), Parcel은 잡을 수 있습니다.Parcel을 사용하게 되면 어쩔 수 없이 버리거나 바꿔야 하는 것들이 있습니다. 아직까지 찾아본 바로는 다음과 같습니다.
export * as A from B
(B의 모든 named export를 A로 export)가 있습니다.@parcel/transformer-typescript-types
의 문제로, 이 PR에서는 위에 해당하는 문법들을 다음과 같이 바꿔서 해결했습니다.tsconfig
의baseUrl
과path
property를 지원하지 않습니다.tsconfig
에서path
를 통해"Components/*": ["src/components/*"], "Constants/*": ["src/constants/*"], ...
와 같이 정의하고 있는데, 이렇게 정의한 alias들을 사용하지 못하게 됩니다.import { Text } from 'Components/Text'
import { Text } from '~/src/components/Text'
🤔 Todo
앞으로 해야 하거나 하고 싶은 것들입니다.
@parcel/reporter-bundle-analyzer
사용: 번들 visualize가 가능합니다.typecheck
스크립트에@parcel/validator-typescript
사용: Parcel은 내부에서 사용하는 타입 체커를 외부에서 사용할 수 있도록 제공하고 있습니다. 그리고 이는 상기했듯 tsc보다 더 빠릅니다.typecheck
스크립트에 이를 사용해서 commit hook 수행에 걸리는 시간도 줄일 수 있을 것 같습니다.Breaking change or not (Yes/No)
Yes.
References