Skip to content

Commit

Permalink
fix: assets load
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-to committed Nov 3, 2023
1 parent 0ec3d92 commit 25fc02b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Kernel extends HttpKernel
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
RenderTorchlight::class
//RenderTorchlight::class
],

'api' => [
Expand Down
7 changes: 7 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ public function register()
*/
public function boot()
{
Vite::useScriptTagAttributes([
'async' => true,
'rel="prefetch" as' => 'script',
]);

Vite::useStyleTagAttributes([
'rel="preload" as' => 'style',
]);
}
}
1 change: 1 addition & 0 deletions resources/views/home.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<style>
[x-cloak] { display: none !important; }
</style>

@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body x-data="{ openMobileMenu: false }" x-cloak>
Expand Down

0 comments on commit 25fc02b

Please sign in to comment.