From a709ef772c0c4c17b5babc116e8aa8a9ecc1cc24 Mon Sep 17 00:00:00 2001 From: boban Date: Fri, 19 Jun 2026 21:50:54 +0200 Subject: [PATCH] fix(assets): drop Vite preload hints (silence 'preloaded but not used') With one CSS + one JS entry the sits next to the matching stylesheet/script and adds no value, but it triggers Chrome's 'preloaded but not used' console warning (amplified by DevTools 'Disable cache', which double-fetches the CSS). Disable preload tag generation; stylesheet and script still load normally. Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 10 ++++++++++ app/Providers/AppServiceProvider.php | 7 +++++++ config/clusev.php | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3a601e..1f71063 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,16 @@ getaggte Releases (Kanal `stable`, optional `beta`) — niemals Entwicklungs-Bui _Keine offenen Änderungen — der nächste Stand wird hier gesammelt und als `vX.Y.Z` getaggt._ +## [0.9.23] - 2026-06-19 + +### Behoben +- **Konsolen-Warnung „resource was preloaded but not used".** Vite legte zu jeder Seite einen + `` für CSS/JS zusätzlich zum normalen Stylesheet/Script an. Bei nur einem + CSS- und einem JS-Bundle bringt der Preload nichts (die Tags stehen ohnehin direkt daneben), löste + aber Chromes „preloaded but not used"-Warnung aus — verstärkt durch DevTools „Cache deaktivieren", + das die CSS doppelt lädt. Die Preload-Hints werden jetzt weggelassen (`Vite::usePreloadTagAttributes(false)`); + Stylesheet und Script laden unverändert. + ## [0.9.22] - 2026-06-19 ### Behoben diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 48c7eb3..a96bdc4 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -10,6 +10,7 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Crypt; use Illuminate\Support\Facades\RateLimiter; use Illuminate\Support\Facades\Route; +use Illuminate\Support\Facades\Vite; use Illuminate\Support\ServiceProvider; use Livewire\Livewire; use Throwable; @@ -36,6 +37,12 @@ class AppServiceProvider extends ServiceProvider */ public function boot(DeploymentService $deployment): void { + // Drop Vite's hints: with only one CSS + one JS entry the preload + // sits right next to the matching stylesheet/script tags, so it adds no real value — but + // it triggers Chrome's "preloaded but not used" console warning (especially with DevTools + // "Disable cache", which double-fetches the CSS so the preloaded copy is never consumed). + Vite::usePreloadTagAttributes(false); + // Re-apply the onboarding gate to EVERY Livewire component update, not just the // initial page GET. Livewire only re-runs route middleware that is registered as // persistent; without this, a component mounted while onboarded could keep running diff --git a/config/clusev.php b/config/clusev.php index e1aa91c..e3d823d 100644 --- a/config/clusev.php +++ b/config/clusev.php @@ -2,7 +2,7 @@ return [ // First tagged release is v0.1.0 (semantic, not -dev). - 'version' => '0.9.22', + 'version' => '0.9.23', // Deployed commit + branch. install.sh bakes these into .env from the host's .git (the prod // image ships no .git); the Versions page prefers them and falls back to a live .git read in