Provide a watching build mode that writes to the disk in development
Created by: andreypopp
See https://github.com/facebookincubator/create-react-app/issues/1018#issuecomment-261792488 for a discussion which leads to the creation of this issue.
I propose adding a new command (working name build-dev
) which watches for changes and rebuild the bundle (effectively, given the current CRA implementation, it should execute webpack --watch
), then writes it onto filesystem.
The main motivation is an easier integration path with non-Node.js dev servers: such servers could just serve continuously updating bundle from the filesystem.
The only desired configuration options is an --output
, which could probably be specified via a command line argument:
% npm run build-dev -- --output ../static/www
Alternative command name suggestions:
watch
build-watch