-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Regression in v3.0.7: breaks hot reloading in webpack-dev-server #900
Comments
Is it fixed if you remove the compilerName parameter from the single entry plugin in your node_modules/html-webpack-plugin/lib/compiler.js ? |
Yes, it does seem that removing the |
Could you please try to reach out for maintainers of HMR or dev server? |
This same change also breaks the stats json that is outputted by the WebpackBundleAnalyzer. So it's not possible to analyze builds anymore when you have version 3.0.7 installed of the html-webpack-plugin. The json that is outputted is not valid json:
It works again when I remove the compilerName parameter. I think these issues are somehow related that's why I added this as a comment and not as a separate issue. |
@LINKIWI @hjeti could you please try to replace html-webpack-plugin/lib/compiler.js Line 49 in df32593
With new SingleEntryPlugin(this.context, template, path.basename(outputFilename)).apply(childCompiler); This would remove all whitespaces and quotes from the name. |
I don't know. Weird. I could image this is caused either by |
@jantimon the path.basename fix works for me |
@jantimon Unfortunately that patch does not seem to fix the HMR issue. |
HMR nope. |
Could you please try to use ‘*’ like @sokra proposed? |
Changing the entry name to |
Sry I have no idea what causes this behavior and it was reported only once for now. |
It looks like more than once. |
What would be your preferred solution? |
I understand that webpack-dev-server is an independent project and interoperability with it is not necessarily a priority of this plugin. However, given its popularity, perhaps it would be worth adding a note in documentation (maybe for the changelog entry of 3.0.7) that the latest version breaks compatibility with HMR, and that interested users should pin an older version. (At least until the problem is sorted out) |
Released 3.0.8 (which is the same like 3.0.6) |
Hello, install the latest version 3.1.0, and for me, it is still giving the same error but now it shows a new line:
Hash: 919fb45ad88b262d4ead WARNING in configuration ERROR in multi ./src/index.jsx this is my log file: |
@ecanro That looks like an error in your Webpack configuration, unrelated to this plugin. The error is shown to you very clearly:
|
Yes, you are right! Now it works when the file is created, can close this issue |
I have |
It looks like webpack-dev-server's bug? |
|
@nitish24p @sergeymorkovkin this issue is about a change in 3.0.7 which was already reverted. So your problem is very very likely not related to this issue. Please open a new issue with the expected and actual behaviour. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Hi there, I just upgraded to v3.0.7 and noticed that hot reloading via webpack-dev-server has broken in a development environment.
Steps: Start
webpack-dev-server
, edit a watched source fileExpected behavior: Observe that the bundle re-compiles, and the updated bundle is served to the browser.
Actual behavior as of 3.0.7: Observe that the bundle re-compiles, but the updated bundle is not served to the browser. Note that no errors or warnings are logged.
The expected behavior and actual behavior are identical in 3.0.6 and earlier.
The only change moving from 3.0.6 -> 3.0.7 is pretty minor: 26dcb98 not sure if it is directly related.
I haven't had time yet to whip up a full MCVE, but here are some snippets of config and environment to help provide context:
Config
Irrelevant portions of the config are snipped.
webpack.config.js
:And the template
index.html
:Environment
Operating system:
linux 4.13.0-37-generic
Node: 8.9.0
npm: 5.6.0
Webpack version: 4.1.1
Library version: 3.0.7
The text was updated successfully, but these errors were encountered: