ui: lazyload sentry

This commit is contained in:
undefined committed 2024-08-09 01:14:46 +08:00
1 parent 977b6f2575
commit ef4862d785
4 files changed
+43 -31

No files matched your search

+2 -2
View File
@@ -89,7 +89,7 @@ self.addEventListener('notificationclick', (event) => {
});
const PRECACHE = `precache-${process.env.VERSION}`;
const DO_NOT_PRECACHE = ['.worker.js', 'fonts', 'i.monaco'];
const DO_NOT_PRECACHE = ['.worker.js', 'fonts'];
function shouldCachePath(path: string) {
if (!path.split('?')[0].split('/').pop()) return false;
@@ -121,7 +121,7 @@ let config: ServiceWorkerConfig = null;
function initConfig() {
config = JSON.parse(new URLSearchParams(location.search).get('config'));
config.hosts ||= [];
if (!config.domains?.length) config.domains = [location.host];
config.domains = Array.from(new Set([location.host, ...(config.domains || [])]));
console.log('Config:', config);
}