Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vibonacci's avatar

Completely stripping out Vite from a Laravel API only project

Hi,

I am using Laravel 11 as an API only project. I do not render any front-end web pages, so I do not need any front-end bundler. Vite installing takes time, node_modules, takes up a port and distracts fellow devs from the impression that it is used while it is in the project. But most importantly, I don't want services installed that are not used.

I only use .blade.php templates to render HTML emails.

Is it possible to remove Vite entirely from a Laravel 11 project, and operate an API Laravel only project without any front-end bundler, or is a bundler tightly integrated into Laravel?

I can't seem to find any sources with a similar request as mine.

0 likes
4 replies
Tray2's avatar

If you don't need it, just don't run npm install or just delete the node_modules directory.

vibonacci's avatar

Forgot to mention that while using Laravel Sail locally, it seems port 5173 is occupied due to Vite.

vibonacci's avatar

I'm not running the Vite, nor did I install the node_modules with npm i or anything, yet the 5173 port is occupied when I run Laravel Sail.

Please or to participate in this conversation.