Create-react-app: Editing index.html does not trigger a reload

Created on 15 Sep 2016  Β·  5Comments  Β·  Source: facebook/create-react-app

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!

bug underlying tools

Most helpful comment

@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

All 5 comments

I also noticed that this is happening. Weird though, because react-scripts seems to use html-webpack-plugin when using that package, it takes care of the live-reloading. Also interesting is that when saving index.html, it does re-compile.

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.

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

β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”¬ [email protected]
β”‚ └── [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”¬ [email protected]
β”‚ └── [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
β”œβ”€β”€ [email protected]
└── [email protected]

@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

Please help beta test the new version that includes this change!
https://github.com/facebookincubator/create-react-app/issues/2172

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexeyRyashencev picture AlexeyRyashencev  Β·  3Comments

alleroux picture alleroux  Β·  3Comments

xgqfrms-GitHub picture xgqfrms-GitHub  Β·  3Comments

fson picture fson  Β·  3Comments

jnachtigall picture jnachtigall  Β·  3Comments