Is 233mb size for a react project a lot?

Hello all,
So when I was on my computer I right clicked on my project files and went to properties and discovered the total size was 233mb. Granted, that does include node modules and the other stuff in create-react-app. And this is a super simple app. I don’t see why it’s this large. Any thoughts is appreciated! Thank you!

No that’s not a lot, I just checked a fairly fresh react project I created using CRA and it’s over 200mb already as well… node_modules y’know. ^^ Especially since CRA isn’t meant to be configurable, it just includes everything you might or might not need by default (which is nevertheless a valid philosophy IMHO). Reminds me to delete some older projects though LOL!

1 Like

@Liamgrossman, consider that after you’ll run npm run build the resulting code for production in the “build” folder will take much less space. I just tested on one dummy project I had. The project was 186MB in totale (excluding the build folder). The generated build folder was only 4.7MB.

1 Like

Yeah that’s what I thought, I’ll try that today :+1:t2:

If it’s an NPM project then most of that should be in your node_modules folder, which is just your tooling. When you compile it should be much smaller. My current project is around that but it compiles to less than 1mb. Your compiled project should always be under 4-5mb or so. If you start pushing up around 2mb you need to start figuring out why and how to cut it down.Usually it’s unnecessary libraries or improper imports.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.