ianmiller347 / feather-icons-react

Feather Icons as a React Component
46 stars 10 forks source link

Using named exports #46

Open brettdewoody opened 3 months ago

brettdewoody commented 3 months ago

I'm attempting to use named exports, like:

import { Close } from 'feather-icons-react'

in order to reduce our bundle size. But when I analyze our bundle I see all the icons are loaded, which adds 850KB (unminified) to our production bundle.

We're using vite, and all icons use the named imports (so we're not importing the default feather-icons-react anywhere).

Should our bundle only include the icons we're importing?