Skip to content

Commit

Permalink
fix: vite dev mode when hotfile is detected
Browse files Browse the repository at this point in the history
  • Loading branch information
mmachatschek committed Apr 23, 2024
1 parent 0542dae commit 081a4d2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions resources/views/layout.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
@php
use Illuminate\Support\Facades\Vite;
use Illuminate\Foundation\Vite;
$nonExistentFileName = '/vendor/horizon/nonExistentFile';
$vite = new Vite();
$vite->useHotFile($nonExistentFileName);
@endphp
<!DOCTYPE html>
<html lang="en">
Expand All @@ -8,7 +13,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="csrf-token" content="{{ csrf_token() }}">
<link rel="shortcut icon" href="{{ Vite::asset('resources/img/favicon.ico', 'vendor/telescope') }}">
<link rel="shortcut icon" href="{{ $vite->asset('resources/img/favicon.ico', 'vendor/telescope') }}">

<meta name="robots" content="noindex, nofollow">

Expand All @@ -17,7 +22,7 @@
<!-- Style sheets-->
<link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=figtree:300,400,500,600" rel="stylesheet" />
@vite('resources/sass/styles.scss', 'vendor/telescope')
{{ $vite('resources/sass/styles.scss', 'vendor/telescope') }}
</head>
<body>
<div id="telescope" v-cloak>
Expand Down Expand Up @@ -235,6 +240,6 @@
window.Telescope = @json($telescopeScriptVariables);
</script>

@vite('resources/js/app.js', 'vendor/telescope')
{{ $vite('resources/js/app.js', 'vendor/telescope') }}
</body>
</html>

0 comments on commit 081a4d2

Please sign in to comment.