-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trigger recompilation on node module changes. #212
Conversation
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? |
It looks like you can just intercept the request, like in the example it shows a sort of whitelist of dev dependencies: plugins: [
new NpmInstallPlugin({
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. |
Yea, I’d like to get this in but the lack of progress indicator is unfortunately a blocker for me. |
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. |
^^ also a very good point. I think |
We also may want to add something more to the docs regarding how exactly to install dependencies. |
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
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 |
@eanplatter Thanks! |
@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_modules
change, 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.