React Hot Reload not working on Docker For Windows
See original GitHub issueI’ve been looking into getting hot reload to work on docker for windows. I’ve found out that I need to get webpack to poll files due to the filesystem used in docker for windows mounted volumes, I need to add the below to the webpack configuration but I’m not sure where to add it in the dev.babel.js file (if that is the correct file). I’ve tried adding it in multiple places but I’m not sure if it’s not working or I don’t have the configuration correct.
watchOptions: {
poll: 1000
}
Any help will be greatly appreciated
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:13 (8 by maintainers)
Top Results From Across the Web
React hot reload doesn't work in docker container
Currently, if I create a file it recompiles, but if I change something in a file it does not.
Read more >CRA 5.0 fails to hot-reload in a docker container built ... - GitHub
I am on windows, That may cause the issue. Latest Node docker image : Node.js v17.4.0. Workaround with previous version : Need react-script...
Read more >Live Reload with Docker and React | by Chavez Harris - Medium
Getting live reload to work in a React docker setup can be a bit difficult and up to a point seem impossible but...
Read more >Hot Reload on Docker Desktop Windows
The only problem is HOT RELOAD does not work. If you mount a Windows folder into the container and develop in this folder...
Read more >Docker-compose with WSL 2 React app not hot reloading on ...
You can use WebPack packaging tool, by the way Hot Module Reload is not using on production in most case(Compact bundle will be...
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 Free
Top 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
@SC7639 I have updated the code to accept watchOptions from config to enable watch config, Please update the file webpack/dev.babel.js by the following option in devServer section:
This should also be updated for service worker configuration just in case, ( I added backup config from above but adding it to service worker would make more sense:
Let me know if this fixes the issue!
@aaaleeex7 I think you are posting it in wrong repo 😃 This repo is for ReactPWA. Please raise an issue here: https://github.com/facebook/create-react-app/issues