mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: lazyload sentry
This commit is contained in:
4 files changed
+43
-31
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user