konradkalemba / tabler-icons-react

🎨 Tabler Icons for React
https://tabler-icons-react.vercel.app
MIT License
198 stars 9 forks source link

Huge bundle size #10

Closed Gerald12344 closed 2 years ago

Gerald12344 commented 2 years ago

image I import it using code like

import { Archive, ShoppingCartDiscount, Trash } from 'tabler-icons-react';

but somehow the whole library is added to the bundle what am I doing wrong?

konradkalemba commented 2 years ago

@Gerald12344 Thank you for the report. It seems that "tree-shakeability" wasn't properly implemented and the bundler in your project couldn't exclude not used icons.

Could you try installing newest version and check if it works properly now?

npm i tabler-icons-react@1.48.1
feledori commented 2 years ago

@konradkalemba I just tested the new version and it fixed the issue. At least on my project. Thanks!

Gerald12344 commented 2 years ago

Could you try installing newest version and check if it works properly now?

Will do tonight thanks