From cb96b14239d73b085f82724bea9a7898b1652758 Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Thu, 5 Oct 2023 18:17:04 +0100 Subject: [PATCH] Load Statamic scripts using DOMContentLoaded instead of a data src --- resources/views/partials/scripts.blade.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/views/partials/scripts.blade.php b/resources/views/partials/scripts.blade.php index fb4c44328b..5455a6bd0c 100644 --- a/resources/views/partials/scripts.blade.php +++ b/resources/views/partials/scripts.blade.php @@ -17,8 +17,10 @@ +])); {{-- Deferred to allow Vite modules to load first --}} - +window.addEventListener('DOMContentLoaded', () => { + Statamic.config(StatamicConfig); Statamic.start(); +}); +