question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Editing index.html does not trigger a reload

See original GitHub issue

I’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:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
gaearoncommented, Sep 30, 2016

@SpaceK33z I am seeing the same issue when editing any of the JS files with this configuration - is this the same issue:

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

screen shot 2016-09-30 at 13 15 00
2reactions
SpaceK33zcommented, Sep 20, 2016

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 the window 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found