Skip to content
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

Page does a full reload with hmr enabled #1287

Closed
1 of 2 tasks
GiancarlosIO opened this issue Jan 21, 2018 · 4 comments
Closed
1 of 2 tasks

Page does a full reload with hmr enabled #1287

GiancarlosIO opened this issue Jan 21, 2018 · 4 comments

Comments

@GiancarlosIO
Copy link

GiancarlosIO commented Jan 21, 2018

  • Operating System:
  • Node Version: 8.9.0
  • NPM Version: 5.5.4
  • webpack Version: 3.10.0
  • webpack-dev-server Version: 2.11.1
  • This is a bug
  • This is a modification request

Code

webpack.config.js
screenshot from 2018-01-20 21 23 53

index.js
screenshot from 2018-01-20 21 24 53

server.js
screenshot from 2018-01-20 21 24 23

and in my index.html i have this script tag
<script src="http://localhost:4000/client/dist/app.min.js"></script>

Expected Behavior

HMR should works

Actual Behavior

Page does a full reload when i use a index.html served from node.js
screenshot from 2018-01-20 21 16 41

For Bugs; How can we reproduce the behavior?

git clone https://github.com/GiancarlosIO/node-rgr-app
npm install && npm server:watch && npm client:watch
Open http://localhost:3000 and edit ./client/print.js — hmr not work, Full page reload instead of module reload

@GiancarlosIO GiancarlosIO changed the title Page make a full reloead with hmr enabled Page does a full reloead with hmr enabled Jan 21, 2018
@byzyk
Copy link
Member

byzyk commented Jan 22, 2018

Please check if this PR #1276 fixes an issue for you.

@hg-pyun
Copy link

hg-pyun commented Feb 22, 2018

#1315 I have a same issue. It works when I matches 'public path'.

@GiancarlosIO GiancarlosIO changed the title Page does a full reloead with hmr enabled Page does a full reload with hmr enabled Feb 22, 2018
@GiancarlosIO
Copy link
Author

@haegul what do you mean with 'matches publicPath'? 🤔
my devServer and output objects have the same publicPath 🤔

@alexander-akait
Copy link
Member

Reproducible test repo doesn't work, also you use outdated version of webpack-dev-server, please update. Closing issue due can't reproduce, anyway feel free to feedback. If somebody can create working reproducible test repo with latest version of webpack-dev-server i will reopen issue and fix problem, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants