An Interest In:
Web News this Week
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
- April 19, 2024
- April 18, 2024
- April 17, 2024
February 25, 2022 08:48 am GMT
Original Link: https://dev.to/vanquard/basic-create-react-app-1g48
Minimal create-react-app
The problem:
When I start a new create-react-app (CRA), it has a lot of files and stuff I don't need. This includes:
reportWebVitals
(Analytics and performance, etc.)logo.svg
and some other stuff to create the React "Hello World" app.setupTests.js
, and other test related defaults.Although I might be yelled at for saying: "I don't need testing", I just don't need it for smaller prototype setups.
The solution
When I tried to research for a solution for this problem (fancy way of saying, I googled it), I encountered a post on Stackoverflow, and I am obviously not the only one with this problem, so a guy from CRA (if I remember correctly), commented and mentioned they have developed templates
to satisfy users which had a different workflow than the default one.
And that I could find all the templates available on npm, simply by searching for cra-template-*.
Here I found the template I was looking for and can now create my simple and basic CRA Apps, simply by typing:
npx create-react-app my-app --template minimal
Original Link: https://dev.to/vanquard/basic-create-react-app-1g48
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To