-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
Guides - Issue in HMR Guide #1443
Comments
You should take a look at #1439 as the guide is currently being rewritten, and also make sure you are on the latest version of webpack. I believe in v1, the additional |
@sivkun I tested this out again and was not able to reproduce your issue. Please check out TheDutchCoder/webpack-guides-code-examples#18 and provide an example repo to reproduce your issue. If you run the code there you should see the log every time a change is made in I'm pretty sure what you're seeing is due to an outdated version but I could be wrong. Note that the example is on the latest version of webpack (3.3.0). |
@skipjack Ifind this if I add babel-loader in webpack.config.js ,the demo you provided cann't work well。 npm install --save-dev babel-loader babel-core babel-preset-env second ,add this in webpack.config.js module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['env']
}
}
}
]
}, if so, you can reproduce the issue. I don't konw why. thank you! |
Ah I see -- the issue is most likely that you need to tell However this isn't really a support channel so you'd probably be better off asking the question on StackOverflow or on webpack gitter channel. The main concern here is that the examples work by default, not with unknown modifications. |
Just to be clear, webpack 2 and 3 understand ES2015 module syntax out of the box -- so using babel to resolve modules can cause various issues like the one you're seeing. |
Ah I see,I will have a try .Thank you very much! |
I according to the document hot-module-replacement.But,the output in chrome console is the name of updaded file,nothing else.
the output info
if so
then output
The text was updated successfully, but these errors were encountered: