Compare commits

...

2 Commits

Author SHA1 Message Date
a701495607 2.4.34
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 22s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 49s
Build & Deploy / 🧪 QA (push) Successful in 1m18s
Build & Deploy / 🏗️ Build (push) Successful in 2m36s
Build & Deploy / 🚀 Deploy (push) Successful in 24s
Build & Deploy / 🔔 Notify (push) Successful in 3s
2026-07-17 15:19:27 +02:00
88132b8f84 fix: lazy initialize client services to bootstrap sentry 2026-07-17 15:19:27 +02:00
2 changed files with 10 additions and 3 deletions

View File

@@ -22,11 +22,18 @@ export default function AnalyticsShell() {
return;
}
const initServices = () => {
import('@/lib/services/create-services').then(({ getAppServices }) => {
getAppServices();
setShouldLoad(true);
}).catch(console.error);
};
// Wait until browser is completely idle before loading heavy analytics/logger/sentry SDKs
if (typeof window !== 'undefined' && 'requestIdleCallback' in window) {
window.requestIdleCallback(() => setShouldLoad(true), { timeout: 3000 });
window.requestIdleCallback(initServices, { timeout: 3000 });
} else {
const timer = setTimeout(() => setShouldLoad(true), 2500);
const timer = setTimeout(initServices, 2500);
return () => clearTimeout(timer);
}
}, []);

View File

@@ -140,7 +140,7 @@
"prepare": "husky",
"preinstall": "npx only-allow pnpm"
},
"version": "2.4.33",
"version": "2.4.34",
"pnpm": {
"onlyBuiltDependencies": [
"@parcel/watcher",