3 ms·
The Create-React-App tool hides all of the Babel and Webpack configuration by default. The only dependency you have in your app is the `react-scripts` package.
by acemarke 8y ago
The Create-React-App tool hides all of the Babel and Webpack configuration by default. The only dependency you have in your app is the `react-scripts` package.
This drastically simplifies things for your app, and means you can get the latest build system updates with a single update command whenever a new version of `react-scripts` comes out. However, it also means that if you _do_ need to modify the configuration in some way, it's normally inaccessible.
CRA includes a one-time `npm run eject` command that copies over all of the actual dependencies and config files into your project. "Ejecting" means you're taking ownership of those config files, and also means you lose the ability to easily upgrade with a single command.
- Waterluvian 8y agoThanks. That sounds like a pretty elegant way to hide all that complexity. Let's hope things continue to converge and simplify into a more universal set of standards, defaults, and built ins.
- Raed667 8y agoYou can even change some webpack configs without ejecting using react-app-rewired. Its pretty nice if you only care to change one or 2 simple settings. (like name of build files, babel plugins, etc...) https://github.com/timarney/react-app-rewired/ https://github.com/timarney/react-app-rewired/
- ehavener 8y agoHow difficult would it be to use this to add a staging environment? It seems like that's the only build config change that I ever desire.
- Raed667 8y agoI'm not sure with what you mean by staging environment in this context. You can run your app in a webpack-devServer or build it then use your own server. How does staging fit in here ?
- lilcorey10 8y agoSo sort of like what forking does on a Github repo?