-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Watch files not required with webpack #34
Comments
This should be possible within a plugin. Something similar to this: plugins: [
function(compiler) {
compiler.plugin("after-compiler", function() {
this.fileDependencies.push("/path/to/my/file");
this.contextDependencies.push("/path/to/my/folder");
}
}
] |
I gave this a try and added this to the top of my gruntfile:
When I change worksheet.html I see in the javascript console:
If I comment out the HotModuleReplacementPlugin it will refresh the page otherwise it does nothing. |
+1 for this feature |
Is this possible or not? |
Bit of a janky solution, but I used the text-loader module to do something like this. (In my case, CSS generated outside of webpack, but same principal.) Basically, just
That way, A better variant of this would be to have a "hash-loader" which would just MD5 hash the content and use that instead of the actual content, because in this case you don't actually need the content, just something to notify that there's a change. Should be pretty easy to create such a loader. |
+1 |
👏 |
Closing issue because the answer provided is clear; make a loader for this, or use an existing one :). |
Did anyone ever come up with a solution for this? It doesn't seem like |
@sokra shouldn't this be |
Hi, try this : https://github.com/Fridus/webpack-watch-files-plugin ;) |
Just wrote a plugin that does exactly the same - solves your problem - https://www.npmjs.com/package/filewatcher-webpack-plugin . @Fridus looks like this 1 got move power under its sleeve. |
possible problem for Linux users see https://webpack.js.org/configuration/watch/#not-enough-watchers |
Hi! Would it be possible to add to webpack-dev-server and middleware an option to watch also files outside the required ones?
This is needed specially for the HTML files, and maybe some css ones.
Thank you!
The text was updated successfully, but these errors were encountered: