Uh oh!
There was an error while loading. Please reload this page.
Trigger recompilation on node module changes. - #212
Conversation
gaearon
commented
Jul 26, 2016
Can you explain what
in the README means? Why would I want that, and why does the example show build dependencies when presumably the project is about runtime deps? |
eanplatter
commented
Jul 26, 2016
It looks like you can just intercept the request, like in the example it shows a sort of whitelist of dev dependencies: plugins: [newNpmInstallPlugin({dev: function(module,path){return["babel-preset-react-hmre","webpack-dev-middleware","webpack-hot-middleware",].indexOf(module)!==-1;},}),],I guess to prevent devDependencies from receiving unapproved modules? Though, I don't know when that would really happen, unless you manually attempted to install something. |
gaearon
commented
Jul 26, 2016
gaearon
commented
Jul 26, 2016
Yea, I’d like to get this in but the lack of progress indicator is unfortunately a blocker for me. |
ForbesLindesay
commented
Jul 26, 2016
I'm a bit concerned by the idea of automatic installation of dependencies. It significantly increases the risk of being exposed to malicious code via small typos. |
gaearon
commented
Jul 26, 2016
^^ also a very good point. I think |
ForbesLindesay
commented
Jul 26, 2016
We also may want to add something more to the docs regarding how exactly to install dependencies. |
eanplatter
commented
Jul 26, 2016
Ahh, yeah I'd have to agree. It's a fancy feature but there are some definite drawbacks. I think for this problem the best solution will to have a webpack plugin that just recompiles if the |
1 similar comment
eanplatter
commented
Jul 26, 2016
Ahh, yeah I'd have to agree. It's a fancy feature but there are some definite drawbacks. I think for this problem the best solution will to have a webpack plugin that just recompiles if the |
gaearon
commented
Jul 26, 2016
@eanplatter Thanks! |
ericclemmons
commented
Jul 26, 2016
@gaearon Feel free to open an issue if you find something cosmetic a blocker ;) Lately, I use the defaults so that all deps save to But, my overall thought is that it's not this project's job to save users from using To me, |

An Attempt at fixing #186.
This plugin offers a bit more than just recompiling when the
node_moduleschange, it also auto installs dependencies that are referenced if they don't already exist (which may or may not be a good thing).Personally I like the feature, but I could see it being obtrusive, I am open to solving this in a different way.