Search code examples
reactjscontainerscreate-react-appdocker-machinedocker-toolbox

Bundle.js from create-react-app loads slowly with Docker Toolbox


I have a react web app built using create-react-app that is currently running inside a container. The development bundle.js is kinda big ~2mb. But, it takes the webpack-dev-sever that is running inside the container more than 30 seconds to load the bundle. Is there any way to speed this up? I'm using Docker Toolbox with Windows 7

Screen Shot:

screen shot


Solution

  • I realized that CHOKIDAR_USEPOLLING is inherently slow when used to enable hot reload for webpack in a docker container. A better alternative is to run the webpack stuff outside the container