From 2af5f4acb91f52aeae763481397260000292b8d5 Mon Sep 17 00:00:00 2001 From: SlimusMinus Date: Tue, 20 Oct 2026 23:44:50 +0300 Subject: [PATCH] Load Google Fonts and Yandex Maps without blocking app start The fonts were pulled by @import inside the main CSS bundle; the deferred app bundle waited for that stylesheet, so a slow fonts.googleapis.com kept the page blank for 20-30 s. Fonts now load from index.html as a print stylesheet switched on by onload (text renders with a fallback font meanwhile, display=swap). The Maps API script was defer, so the app bundle (deferred after it) could not run until the Maps API downloaded. It is async now; map code already waits for window.ymaps via whenYmapsReady. Co-Authored-By: Claude Opus 5.5 --- public/index.html | 18 +++++++++++++++++- src/styles/NakhodkaLanding.css | 2 +- src/styles/base.css | 2 +- src/utils/ymapsApi.js | 2 +- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/public/index.html b/public/index.html index 6ecef77..8960f4f 100644 --- a/public/index.html +++ b/public/index.html @@ -12,7 +12,23 @@ content="Web site created using create-react-app" /> - + + + + + + +