Categories
create-react-app docker macos reactjs webpack

React Webpack not rebuilding when edited file outside docker container (on mac)

I’ve used create-react-app to create a react app inside a docker container.
When I edit App.js inside the container, the app automatically gets rebuilt and the browser reloads.
But when I edit a file outside the container (on the host) it doesn’t get rebuilt.

Is this is a webpack/watch problem – but maybe also has something to do with running docker on a mac?
Any help would be appreciated.

I assume this sort of thing is quite normal for a developer setup (ie – using docker to create your build environment but using a mount for the actual code).

Here is a Github repo with what I’m using.