Laravel 13.30 introduces enhanced control over the php artisan dev command, allowing developers to fine-tune their local environment. By default, this command runs various development processes such as Vite or vendor-specific watchers. However, in specific application architectures, you might want to exclude these to prevent overlap or reduce resource usage.
You can now utilize the DevCommands facade to filter which processes are triggered. The two primary methods introduced are:
DevCommands::withoutVendorCommands(): Prevents processes registered by third-party packages from running.DevCommands::withoutDefaultCommands(): Skips the standard Laravel development processes.
By implementing these in your service provider, php artisan dev will only execute the specific processes you have manually registered for your application.
Sources
- https://laravel-news.com/artisan-dev-exclude-vendor-commands