react-ionicons icon indicating copy to clipboard operation
react-ionicons copied to clipboard

Import Size

Open MattHeslington opened this issue 3 years ago • 1 comments

Hi,

I find your project pretty much invaluable and use it a lot. I'm just concerned about the file/icon import sizes. On importing just one icon into a component the Import Cost VS Code plugin informs me the import size is 1.8M (gzipped 213.5k). This is huge. Is it accurate?

Cheers, Matt

MattHeslington avatar Aug 02 '21 13:08 MattHeslington

I've seen the same thing. If I create a new react app, include the package, the build size is 43.7kB and when I add a single icon to a component, the build size increases to 278kB. If I import the icon using "import CartOutline from 'react-ionicons/lib/CartOutline';" then the build size decreases down to 58.92kB, which is still a significant increase for a single icon. Is there another way to do this?

rabidkitten avatar Feb 10 '22 15:02 rabidkitten