File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,13 @@ protected function installLivewireStack()
196196 copy (__DIR__ .'/../../stubs/resources/markdown/policy.md ' , resource_path ('markdown/policy.md ' ));
197197
198198 // Service Providers...
199- copy (__DIR__ .'/../../stubs/app/Providers/JetstreamServiceProvider.php ' , app_path ('Providers/JetstreamServiceProvider.php ' ));
199+ copy (__DIR__ .'/../../stubs/app/Providers/JetstreamServiceProvider.php ' , $ provider = app_path ('Providers/JetstreamServiceProvider.php ' ));
200+
201+ $ this ->replaceInFile ([
202+ PHP_EOL .'use Illuminate\Support\Facades\Vite; ' ,
203+ PHP_EOL .PHP_EOL .' Vite::prefetch(concurrency: 3); ' ,
204+ ], '' , $ provider );
205+
200206 ServiceProvider::addProviderToBootstrapFile ('App\Providers\JetstreamServiceProvider ' );
201207
202208 // Models...
@@ -766,8 +772,8 @@ protected function runDatabaseMigrations()
766772 /**
767773 * Replace a given string within a given file.
768774 *
769- * @param string $search
770775 * @param string $replace
776+ * @param string|array $search
771777 * @param string $path
772778 * @return void
773779 */
Original file line number Diff line number Diff line change 33namespace App \Providers ;
44
55use App \Actions \Jetstream \DeleteUser ;
6+ use Illuminate \Support \Facades \Vite ;
67use Illuminate \Support \ServiceProvider ;
78use Laravel \Jetstream \Jetstream ;
89
@@ -24,6 +25,8 @@ public function boot(): void
2425 $ this ->configurePermissions ();
2526
2627 Jetstream::deleteUsersUsing (DeleteUser::class);
28+
29+ Vite::prefetch (concurrency: 3 );
2730 }
2831
2932 /**
You can’t perform that action at this time.
0 commit comments