fix(assets): drop Vite preload hints (silence 'preloaded but not used')

With one CSS + one JS entry the <link rel=preload> 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) <noreply@anthropic.com>
feat/v1-foundation v0.9.23
boban 2026-06-19 21:50:54 +02:00
parent c020af4c09
commit a709ef772c
3 changed files with 18 additions and 1 deletions

View File

@ -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
`<link rel="preload">` 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

View File

@ -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 <link rel="preload"> 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

View File

@ -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