levrik / mdi-react

Material Design Icons for React/Preact packaged as single components
Other
147 stars 23 forks source link

Generate an index.js #84

Open mrvisser opened 3 years ago

mrvisser commented 3 years ago

I think it would improve developer experience if there was an index file where each icon was exported, as opposed to all default exports.

At least for VSCode, I can start typing ServerNe..., then VSCode will suggest the icon, then I hit enter and it automatically adds the import statement. This doesn't work unfortunately with default exports.

Would you accept a PR that generates an index file that exports each icon?

ianstormtaylor commented 3 years ago

Please reconsider this @levrik! (It seems it was removed in https://github.com/levrik/mdi-react/commit/07ec6a17f10c5ec410736e57e6187287e24a32c1?) This library is perfect, but not having decent autocomplete is the only thing that would prevent me from using it.

If it's a bundle size concern I think you could just explain how to ensure small sizes with treeshaking? I believe other icon libraries do this (like MUI).