Editing index.html does not trigger a reload
See original GitHub issueI’d say this is pretty minor, but I noticed when I updated my index.html
<title>
it did not trigger a browser reload. I did however see it on manual refresh.
I also noticed that I wasn’t exactly clear on how index.html
maps to index.js
, when I started digging through webpack.config.dev.js
. I saw a few comments in there, while looking through it briefly to see if I could resolve this locally and perhaps send a PR. I’m extremely new to webpack, so I don’t dig around in here too much yet (and I don’t eject really either).
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Browsers does not reflects updates in the code - html
The easiest way to get around this is to press ctrl + r or ctrl + F5 . The ctrl modifier (supported by...
Read more >location.reload() - Web APIs | MDN
The location.reload() method reloads the current URL, like the Refresh button. The reload may be blocked and a SECURITY_ERROR DOMException ...
Read more >Why webpack-dev-server Live-Reload Is Not Working - Medium
When I modify javascript files, I have to manually run Webpack CLI to see ... Modifying the shell html pages will not trigger...
Read more >A complete guide to full-stack live reload - LogRocket Blog
Try changing and saving the code. Go into index.js and change the console.log message to something ...
Read more >VS Code Live Server – How to Auto-Refresh Your Browser ...
Click on the install button and it will install the extension. Create a New HTML Page. To start the live server, make sure...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If edits to JS don’t reload the page, please check https://webpack.github.io/docs/troubleshooting.html#watching.
In particular, “safe write” option in some IDEs might cause this: https://webpack.github.io/docs/webpack-dev-server.html#working-with-editors-ides-supporting-safe-write
Debugged this a little further; because
hot
modus is enabled, webpack-dev-server doesn’t perform a page reload itself, but passes the hot update through to thewindow
so the webpack bundle can perform a XHR request to get the hot updates. However, and I don’t know why, it should fall back to the reloading the page if it can’t find the hot update.TL;DR - it’s a bug in webpack.