Modularise scripts
Created by: djgrant
Would a PR to modularise scripts in react-scripts be considered?
For example, with start.js
:
scripts
start.js
utils
addWebpackMiddleware.js
createWebpackCompiler.js
createWebpackDevServer.js
runWebpackDevServer.js
Reasons for doing this:
- Clearer for new contributors and people reading code for learning
- Make the process of modifying an ejected CRA app simpler
- Make scripts more extensible in ejected apps and forks (by removing interweaving and enabling reuse)
- Reduce complexity of upstream merges to forks of create-react-app (my motivation)