I just created a new project using the Laravel Livewire starter kit, and surprisingly, it's already over 4GB in size without me adding anything to it. Is this normal for a new project? If not, how can I reduce the project size?
4 Answers
Chances are, that huge size is coming from the 'node_modules' folder that gets included with the Livewire kit. Those frontend tools (like Vite and Tailwind) can really add up. The actual Laravel code is probably just around 50MB. You can run `du -sh *` in your project directory to see what’s using the space. When deploying, you’ll want to leave out 'node_modules' and run `npm install` on your server instead.
Even with 'node_modules' and the 'vendor' directory, a new starter project shouldn’t really hit 4GB. It might be worth checking your composer and package.json files. If you're unsure what's needed, get some help from an AI tool that can guide you on what might be bloating your project.
Most likely, it's the 'vendor' directory that's causing the bulk of the size. When installing your packages with Composer, use the `--no-dev` flag. It’s also a good idea to add `--optimize-autoloader` for production. But honestly, if it's just for development, 4GB isn’t the end of the world.
It sounds a bit unusual for a new Laravel project to be that big, unless you're storing files directly in the 'storage' folder. You could use a tool like Treesize to check your project folder and see what's taking up all the space.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically