watchHandle('vite'); } /** * Create the command array to create a Process object with */ protected function createCommand(string $configPath): array { $command = parent::createCommand($configPath); $key = array_search('build', $command); unset($command[$key]); $command[] = '--host'; return array_values($command); } /** * Handle the cleanup of this command if a termination signal is received */ public function handleCleanup(): void { $this->newLine(); $this->info('Running compile to ensure files exist after exit'); $this->call('vite:compile', [ '--package' => $this->argument('package'), ]); } }