From c841c3d888adc77645dd78ec5796d7f54e76f498 Mon Sep 17 00:00:00 2001 From: Ilya Stepenko <38462532+VampireAotD@users.noreply.github.com> Date: Sat, 2 Nov 2024 13:21:55 +0200 Subject: [PATCH] Refactored code --- src/app/Providers/AppServiceProvider.php | 2 ++ .../dashboard/anime-list-item/AnimeListItem.vue | 7 ++++++- src/resources/js/pages/Anime/Show.vue | 11 +++++++++-- .../dashboard/anime-carousel/AnimeCarousel.vue | 1 + src/resources/views/app.blade.php | 4 ++++ 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/app/Providers/AppServiceProvider.php b/src/app/Providers/AppServiceProvider.php index 881ad031..e4f87909 100644 --- a/src/app/Providers/AppServiceProvider.php +++ b/src/app/Providers/AppServiceProvider.php @@ -13,6 +13,7 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Support\Arr; +use Illuminate\Support\Facades\Vite; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider @@ -32,6 +33,7 @@ public function boot(): void { $this->enforceMorphAliases(); Model::shouldBeStrict(!$this->app->isProduction()); + Vite::prefetch(concurrency: 3); } private function setUpElasticsearchClient(): void diff --git a/src/resources/js/features/dashboard/anime-list-item/AnimeListItem.vue b/src/resources/js/features/dashboard/anime-list-item/AnimeListItem.vue index 2ed0c991..a7fd751c 100644 --- a/src/resources/js/features/dashboard/anime-list-item/AnimeListItem.vue +++ b/src/resources/js/features/dashboard/anime-list-item/AnimeListItem.vue @@ -10,7 +10,12 @@ defineProps();