Closed robbiedhickey closed 7 years ago
@hodorswit, option 1 seems to be straightforward solution. If your intent is to get rid of custom-react-scripts, maybe it's better to create a minimal clean setup manually instead of ejecting CRA, as it will overcomplicate things?
Agreed that ejecting would over-complicating things. For now, I will go with option 1 because it solves the problem at hand in the simplest way.
Longer term, I'm not against creating a minimal custom webpack setup, but ideally I would like this project to benefit from the incremental advances being made by the create-react-app team. I will look into what it would take to get custom-react-scripts
updated to the latest version and submit a PR, that way other projects can benefit as well.
We have a dependency on the
custom-react-scripts
package which requires the user to have a .env file present at the root of their project directory. If the .env file is not present, then subsequentnpm run start
ornpm run build
commands will fail. Right now, the only customization we require is to enable support for decorators in the .env file i.e.REACT_APP_DECORATORS=true
. A couple potential solutions:npm install
@andykog Thoughts?
Approaches 1-3 feel like band-aids. Approach 4 initially struck me as overkill but might have some merit. The reason: I leveraged
custom-react-scripts
to get up and running quickly but the project has not been updated in some time. This may present an opportunity to remove an unnecessary dependency on a package that may no longer actively be maintained.