From 3894baceae252700f2368c8353d2f30acdb45359 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Mon, 4 May 2026 16:25:04 -0400 Subject: [PATCH] fix(live): avoid reloading Tailwind CDN on morph --- emanote/src/Emanote/View/Common.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/emanote/src/Emanote/View/Common.hs b/emanote/src/Emanote/View/Common.hs index 825851c4e..2893f307c 100644 --- a/emanote/src/Emanote/View/Common.hs +++ b/emanote/src/Emanote/View/Common.hs @@ -238,7 +238,12 @@ commonSplices withCtx model meta routeTitle = do <> ".forEach(s => s.setAttribute('im-preserve', 'true'));" <> "});" H.script $ H.toHtml preserveScript + -- Tailwind's browser CDN installs a document-wide MutationObserver. + -- Ema's script reloader would otherwise execute it again on every + -- morph, multiplying observers and making morph navigation wait behind + -- repeated Tailwind rebuilds before EMAHotReload is observable. H.script + ! H.dataAttribute "ema-skip" "true" ! A.src (H.toValue localCdnUrl) $ mempty