Show HN: Looking for feedback on a Webpack/etc plugin

2 points by Klonoar ↗ HN
I say "/etc", because it kind of covers a bunch of different topics.

https://github.com/ryanmcgrath/react-iconpack

react-iconpack is essentially a suite of plugins:

    - A Babel plugin to track <Icon> usage across your builds
    
    - A Webpack or Browserify plugin to inject SVG source as a module  
    
    - A React Component that gets injected to handle 
    displaying icons from the aforementioned module
The build on npm is the old one, which the docs are still more or less current with. The code in the repository linked above is the updated version to work with Webpack; while it does work, it falters when caching is enabled on the upstream stuff (i.e, Webpack/Babel/etc). It's probably because I've just been staring at it for too long but I'd be interested in anyone's thoughts on integrating with said cache setups - the crux of the issue is that the Babel plugin won't run on already-built and cached modules (which makes sense, but is annoying in this particular case).

The rationale for the project is that I don't want to have to specifically import an icon at the top of each file just to display it - I'd rather just write the <Icon ... /> JSX and have it auto-pulled in. It rides on the mental ease of JSX all being inline (not interested in the for-or-against JSX debate).

Apologies if the formatting is off on this, I can never remember how it works on HN.

1 comment

[ 3.9 ms ] story [ 9.8 ms ] thread
If there's just a link and a title, the link gets submitted. If there is anything in the text box, that gets submitted instead of the link.

For a "Show HN", it usually makes sense to submit the link and then an explanatory comment after the thread has been created. For a link to a Github repository, I like to land on the readme page rather than the main repository, but that's just me not finding much value in scrolling.