-
-
Notifications
You must be signed in to change notification settings - Fork 607
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
[Feature]: Watch for webpack config changes in watch mode #15
Comments
@ev1stensberg, @pksjce what you guys think, should this be part of our roadmap to v1 ? |
Minimum - document how to achieve it outside of the cli. I guess it depends on the overall goals and priority. I expect v1 would be more or less what it is right now and you can build more features in v1.1 and so on. |
I'd expect the same. So far, did not have time to look deeper into the already available options, but if this is in there, for sure will be part of v1. Otherwise, I'd agree with you by adding this to a v1.1 milestone |
Fixed #24 |
@ev1stensberg, does this apply to hot-module-reloading / webpack-dev-server? I'm looking for a solution to reset Webpack so it'll pick up the new configuration, and have HMR communicate this change appropriately (likely, a "you must manually refresh to pick up latest changes" type message). How do we enable this in that scenario; is it as simple as watching the files that modify Webpack configuration? How does one use that without causing all watched files to incite a Webpack reset? |
The resave flag applies to HMR, indeed. Let me get back to you about your issues later this week :) |
@ev1stensberg How does #24 solve this issue? It seems like it's not related. |
|
IMHO we should either reopen this issue or webpack/webpack#3153 |
Pinging @bebraw for advice |
It's about restarting the entire process, yeah. Currently you can sort of pull that off with nodemon or similar. Maybe it's better to re-open this for now. |
The current workaround seems to be, as @bebraw suggests, to use nodemon. I'm doing the following which works at the moment: |
It's reported by #664, but #664 cannot be fixed fully since watching webpack config changes shouldn't be handled in VuePresss VuePress can only ensure that when user changes the markdown config, the cache identifier will be updated, so user needn't to clean the ./node_modules/.cache muanully. See: webpack/webpack#3153, webpack/webpack-cli#15
It's reported by #664, but #664 cannot be fixed fully since watching webpack config changes shouldn't be handled in VuePresss VuePress can only ensure that when user changes the markdown config, the cache identifier will be updated, so user needn't to clean the ./node_modules/.cache manually. See: webpack/webpack#3153, webpack/webpack-cli#15
@evenstensberg Is this ticket still valid? Can we close this? |
Still valid, we need to lookup webpack config changes too, doing it in the new version |
Is this implemented already? 17 days has passed from the last post.... I just got here from the link in the book. |
@emilas44 This issue is open since 2016. It is hardly critical. I don't know what you're expecting in 17 days but know that, as most open source projects, webpack is being made by volunteers an is financed by donations. Neither you nor I am entitled to anything but the freedom to contribute to the project. |
@bebraw so has this feature been added to the webpack now? |
@lessfish As far as I understand, it didn't happen. |
@bebraw sorry to hear that |
@bebraw but the issue has been closed, does it mean that the team will not think about this feature? |
@lessfish I'm not sure of the current status. I would check webpack 5 release notes. To do this properly, it needs support at the internals. |
Sorry, gonna reopen, we're gonna support this. |
@evenstensberg any chance we could have a general solution so that modifying content in additional config folders (i.e. |
I think that is a bit out of scope |
It's reported by #664, but #664 cannot be fixed fully since watching webpack config changes shouldn't be handled in VuePresss VuePress can only ensure that when user changes the markdown config, the cache identifier will be updated, so user needn't to clean the ./node_modules/.cache manually. See: webpack/webpack#3153, webpack/webpack-cli#15
This issue had no activity for at least half a year. It's subject to automatic issue closing if there is no activity in the next 15 days. |
bump |
https://thisdavej.com/how-to-watch-for-files-changes-in-node-js/ and update the webpack options object, do this at a highest level in the architecture as possible. Should be doable |
No, it is wrong solution, we need watch any |
No. We need to watch for when the webpack configuration changes, require/import would be the same |
@evenstensberg if something was changed in |
Here solution how we can implement this #2797 (comment) We need:
|
I think it would be easier to in the first iteration to watch for actual configuration file changes, not the compilation itself |
Easier? |
Yes, implementation wise. We can add cache based invalidation later. |
We already can implement this if a developer enables cache, we just need
|
I'm submitting a feature request
Webpack version:
2.x
Please tell us about your environment:
OSX 10.x
Current behavior:
I'm not sure if this was discussed before, but it's one of the pain point for me in webpack workflow.
When config / config's dep is updated — hot reloadable server (or watch mode) must be restarted manually. Usually this hot reloadable server is not stand-alone process, but part of the bigger task or even lives inside docker container. And in case of config related change — the only way to pick this up is to restart everything.
Expected/desired behavior:
It'd be cool if webpack could track such changes and rebuild everything from scratch w/o killing current process.
What is the motivation / use case for changing the behavior?
It'll make easier:
Moved from webpack/webpack#3153
The text was updated successfully, but these errors were encountered: