meronex / meronex-icons

svg react icons of popular icon packs
Other
48 stars 2 forks source link

Build size on Next.js 11 #6

Closed takeshi-evan closed 2 years ago

takeshi-evan commented 3 years ago

Describe the bug

using Import as: import { IoLogoFacebook, IoLogoInstagram } from '@meronex/icons/ios' Build contains the whole IOS pack

Expected behavior Build containing only the icons imported

Screenshots Screen Shot 2021-09-08 at 11 14 03

Framework and versions Next.Js: 11.1.2 Meronex Icons: 4.0.0 Webpack 5 (Default of Next.Js)

Additional context Am I missing something on the usage of the library?

aogaili commented 2 years ago

Can you try to import directly each individual icon? Instead of using destructing and let me know.

e.g import FaBeer from '@meronex/icons/fa/FaBeer';