4 ms·
> If you previously ejected but now want to upgrade, one common solution is to find the commits where you ejected (and any subsequent commits changing the confi
by laurent123456 8y ago
> If you previously ejected but now want to upgrade, one common solution is to find the commits where you ejected (and any subsequent commits changing the configuration), revert them, upgrade, and later optionally eject again.
That seems insane to be honest, yet it's seems to be the norm to upgrade a framework in JavaScript (same with React Native). Is that the best solution there is? In many other languages, you can upgrade a framework without reverting commits or trying to figure out what to keep or change in huge diffs. Surely there should be a way to keep the base config untouched, and have user changes in a separate config that overrides the base on?
- franciscop 8y agoCreate React App is not a framework, it is more similar to a scaffolding system that sets up a group of tools and processes. You can upgrade React normally without issue. The equivalent to what you suggest would be to autogenerate some files with a tool, modify the location and structure or those by hand and then expect the tool to be able to modify then again seamlessly.
- BrandonBradley 8y agoPerhaps! 2.0 has Babel Macros. I think this may allow user changes to config without rolling the react-scripts package to npm with your changes.
- ggregoire 8y agoIf you "eject", you are not supposed to be able to upgrade. Hence the hacky workaround. If you didn't "eject", upgrading is as simple as 'npm update react-script'. This is the norm in JavaScript.