3 ms·
I believe the new version of create-react-app (2.0) will have a bit more flexibility. See: Roadmap for react-scripts@2.0 https://github.com/facebook/create-rea
by andyfleming 8y ago
I believe the new version of create-react-app (2.0) will have a bit more flexibility.
See:
Roadmap for react-scripts@2.0
https://github.com/facebook/create-react-app/issues/3815 https://github.com/facebook/create-react-app/issues/3815
- mikewhy 8y agoI really wish they allowed for a TINY bit of configuration. I understand their need for batteries include, but having to eject to add `target: 'electron-renderer'` is pretty whack. I wrote a thing that overwrites CRA's own webpack configs with one that loads said configs and passes them to a function you control. There's probably a package that does this, or a better way of doing it, but here's what I have: https://gist.github.com/mikew/97e2be1d428aae8460a33dfbee0ca866 https://gist.github.com/mikew/97e2be1d428aae8460a33dfbee0ca8...
- k__ 8y agoDoesn't it allow some kind of custom scripts?
- mikewhy 8y agoI'm not sure if it allows custom user-based stuff. There's things like react-scripts-ts that do things like add TypeScript. But they are actually forks of react-scripts, a whole series of packages.
- ng12 8y agoIt seems like such an obvious oversight. All they had to do was allow me to define a hook function that would let me to arbitrarily modify the Webpack configs before start/build. Every time I ever ejected it's because I had to add a one or two line change to the Webpack configs.
- acemarke 8y agoThere's a more standardized way to overwrite parts of a CRA config - see https://github.com/timarney/react-app-rewired https://github.com/timarney/react-app-rewired .