Closed 0xjojoex closed 2 years ago
Icon takes half of the the uikit bundle size and it's not tree shakable right now. ~250kb
Because we re import all the icons here, webpack cannot tree shake the icon based on the router code splitting https://github.com/pancakeswap/pancake-toolkit/blob/d89126ebcaeed507ffd0d91c2a955a195ce4010f/packages/pancake-uikit/src/components/Svg/AnimatedIconComponent.tsx#L2 https://github.com/pancakeswap/pancake-toolkit/blob/d89126ebcaeed507ffd0d91c2a955a195ce4010f/packages/pancake-uikit/src/components/Svg/IconComponent.tsx#L2
TODO:
icon
future plan:
.
Do you want me to work on it?
Icon takes half of the the uikit bundle size and it's not tree shakable right now. ~250kb
Because we re import all the icons here, webpack cannot tree shake the icon based on the router code splitting https://github.com/pancakeswap/pancake-toolkit/blob/d89126ebcaeed507ffd0d91c2a955a195ce4010f/packages/pancake-uikit/src/components/Svg/AnimatedIconComponent.tsx#L2 https://github.com/pancakeswap/pancake-toolkit/blob/d89126ebcaeed507ffd0d91c2a955a195ce4010f/packages/pancake-uikit/src/components/Svg/IconComponent.tsx#L2
TODO:
icon
should accpet jsx instead of stringfuture plan: