News for hackers. Stuff that matters.
Re:Create React App 2.0: Babel 7, Sass, and More by acemarke on Tuesday October 02, 2018 @01:26AM (#18119027)
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.

Re:Create React App 2.0: Babel 7, Sass, and More by Raed667 on Tuesday October 02, 2018 @03:14AM (#18119404)
You 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/

Re:Create React App 2.0: Babel 7, Sass, and More by ehavener on Tuesday October 02, 2018 @04:06AM (#18119615)
How 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.
Re:Create React App 2.0: Babel 7, Sass, and More by Raed667 on Tuesday October 02, 2018 @04:26AM (#18119705)
I'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 ?

Re:Create React App 2.0: Babel 7, Sass, and More by Waterluvian on Tuesday October 02, 2018 @01:57AM (#18119121)
Thanks. 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.
Re:Create React App 2.0: Babel 7, Sass, and More by lilcorey10 on Tuesday October 02, 2018 @12:16PM (#18123005)
So sort of like what forking does on a Github repo?