v4.0.0-next.77 hot reloading regression from v3
See original GitHub issueDescribe the bug
I have an app where I dynamically import an HTML file and load that into the document. In version 3, changing the HTML file would trigger a refresh no problem, but in version 4 that no longer happens.
Interestingly it does recompile (the output changes to “Compiling…” for a moment) on save, but the new content is not available.
Did you try recovering your dependencies?
$ npm version
6.14.7
Which terms did you search for in User Guide?
Fast refresh, hot reloading
Environment
$ npx create-react-app --info
npx: installed 98 in 5.514s
Environment Info:
current version of create-react-app: 3.4.1
running from /Users/kentcdodds/.npm/_npx/28053/lib/node_modules/create-react-app
System:
OS: macOS 10.15.6
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Binaries:
Node: 14.4.0 - ~/n/bin/node
Yarn: Not Found
npm: 6.14.7 - /usr/local/bin/npm
Browsers:
Chrome: 84.0.4147.135
Firefox: 77.0.1
Safari: 13.1.2
npmPackages:
react: ^16.13.1 => 16.13.1
react-dom: ^16.13.1 => 16.13.1
react-scripts: ^4.0.0-next.77 => 4.0.0-next.77
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
I’m still working on a simple way to reproduce. Will update this here soon.
Expected behavior
I expect changing the file to trigger a refresh of the browser
Actual behavior
Nothing on the page changes until I refresh the browser manually
Reproducible demo
https://github.com/kentcdodds/react-fundamentals
- Go to: http://localhost:3000/1 or http://localhost:3000/isolated/exercise/01.html
- Open
src/exercise/01.html
- Make any change and notice nothing refreshes
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:6 (4 by maintainers)
Top Results From Across the Web
breaks hot reloading in webpack-dev-server · Issue #900
Summary Hi there, I just upgraded to v3.0.7 and noticed that hot reloading via webpack-dev-server has broken in a development environment.
Read more >v4.0.0-next.77 hot reloading regression from v3 - 软件工程师
我有一个应用程序,我动态导入HTML文件并将其加载到文档中。在第3版中,更改HTML文件将触发刷新没有问题,但在版本4中不再发生。
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
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
I have had a quick look in the original mentioned repository and when I add a bunch of logs left and right. Looks like the change is detected but because the status of HMR is
abort
the status won’t be applied as the line:is triggered so the function is exited because canApplyUpdated() returns false so it enters this if-block. I am not sure why the status is
abort
though.Some of the logs which get triggered when changing the html file and then save it:
raw-loader was supported in previous versions, so if it’s no longer supported that’s either a regression or a breaking change. (Not a breaking change for CRA because technically inline loaders isn’t supported. I mean a breaking change for raw-loader or webpack).