-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Hot Reloading broke - webpack v3 #949
Comments
+1 |
I had the same problem, but removing the ModuleConcatenationPlugin plugin fixes the issue for me. @pearofducks Can you try removing it from your Webpack config to confirm if this plugin is breaking the HMR ? |
@Procyon It worked, Thanks! |
@Procyon - make no difference in mine, that plugin was only sourced if it was a production build:
|
Confirmed I am also having issues with Was not HMR that was the problem though, am not using the dev-server - webpack3 watch + webpack.optimize.ModuleConcatenationPlugin() - on Windows does not appear to work as expected - code is not rebuilding on changes to the source... removing the ModuleConcatenationPlugin from dev config resolves the issue - will only use it on prod for now.. |
Here as well on macOS 10.12.5, as soon as I remove |
Same issue here. Some more info for you, this is the error I'm getting:
The failure is in
|
Same here on macOS 10.12.5, Node 6.10.3. Branch to test webpack3: Is there a benefit |
Same bug here, same fix, removing ModuleConcatenationPlugin |
Instead of adding more "same bug/same fix", please just +1 this if you removed Otherwise this is still an open and reproducible issue for the original case/repo. |
It also broke for me on the webpack 3 update, but I dont use |
"Same bug here, same fix, removing ModuleConcatenationPlugin" +1 as @harmon25 said, i try use "webpack --watch --config xxxxxxx", also not working macOS 10.12.5, node 8.1.2, npm 5.0.4, webpack 3 i uploaded my project: https://github.com/JonasGao/test-webpack3 In fact, in my test project, remove the configuration |
+1 |
This part "new webpack.optimize.ModuleConcatenationPlugin()" worked for me when adding the following line at the beginning of my webpack.config.js file :
|
+1 |
I have the same problem. More details below. Hopefully this helps.
HMR works correctly if I change to 2.6.1 – no need to touch any of the configuration files. All that changes is the webpack version. |
Fixed after commenting this line in build/dev-server.js file. |
@ergenekonyigit All this does is not showing the error anymore, hot reloading still won't work for me. |
it is not worked for me too |
What worked for me was put watchOptions in devServer config |
We've got several workarounds that folks have posted that work, and additional info that this may be a problem that was introduced in [email protected]. It's likely to be an issue that's better raised with the main webpack project at https://github.com/webpack/webpack. There's been several updates to webpack (and this module) so I'd encourage you all to try both updates as well. If anyone figures out a workaround in code and would like to submit a PR for it, we'd happily review it. Until then we're going to close this one while we continue our effort to get the Issues for webpack-dev-server under control and to a place where we can efficiently addresses issues. |
Has anyone been able to determine what the cause of this issue is. I've seen some mention that writing something to the content base will trigger a reload ( webpack/webpack#5505 ) But I have not seen this issue myself locally and I'm still able to reproduce. |
#949 (comment) This actually fixed it for me however I think I know what is causing the issue. So I believe that latest Html-webpack-plugin is emitting every time there is a change. There fore that hook is getting triggered in the vue-cli
Therefore a trigger event is occuring every time. I think there needs to be some interfacing when it comes to dev-server and dev-middleware for html-webpack-plugin cc @jantimon is this a known issue? |
Copied from #webpack/5505 @TheLarkInn The html-webpack-plugin has some code which should prevent that: However the best way would be if webpack would allow me to create a child compiler which only recompiles if one of the child compilers source files changes. Right now I have to start the child compiler for the html generation in every webpack I guess providing a better childCompiler could increase the performance of many many many webpack compilations out there. The idea of HtmlWebpackHarddiskPlugin is to help complex setups which produce a template which is than used by express server plugins which work only with files from disk or sth similar use cases. It should be used only for that - (therefore it is not part of the html-webpack-plugin) |
Hello! Im not using update: |
@ergenekonyigit Yes, this one solved my problem. |
Including |
Is hot reloading still broken? I updated from webpack 1 to 3 and can't get it to work yet. |
Setting "webpack-dev-server": "^2.11.1" |
bug
What is the current behavior?
HMR doesn't work against the latest webpack and webpack-dev-server
If the current behavior is a bug, please provide the steps to reproduce.
Unfortunately I'm unable to reproduce this against the stock Vue.js webpack-simple template, but my repo only makes very minor changes to that.
This repo/branch will reproduce the behavior: https://github.com/propellant/components/tree/v7
Clone, yarn,
npm run dev
, change something indemo/App.vue
What is the expected behavior?
Working HMR
Please mention your webpack and Operating System version.
Webpack 3, macOS 10.12.5, node 8.1.2
The text was updated successfully, but these errors were encountered: