Skip to content

Commit ec84efe

Browse files
committed
lighthouse analizi görsel kaldırma.
1 parent c6ee847 commit ec84efe

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

lighthouse-worker/src/lighthouse.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ async function runLighthouseAnalysis(url, analysisType = "basic") {
2222
const chromeLauncher = await import("chrome-launcher");
2323
const lighthouse = await import("lighthouse");
2424

25-
// Chrome'u başlat
25+
// Chrome'u başlat, görsel işlemlerini devre dışı bırak
2626
chrome = await chromeLauncher.launch({
2727
chromeFlags: [
2828
"--headless",
2929
"--no-sandbox",
3030
"--disable-gpu",
3131
"--disable-dev-shm-usage",
3232
"--disable-software-rasterizer",
33+
"--disable-images", // Görsel yüklemeyi devre dışı bırak
34+
"--blink-settings=imagesEnabled=false", // Blink motorunda görüntüleri devre dışı bırak
3335
],
3436
});
3537

@@ -44,6 +46,23 @@ async function runLighthouseAnalysis(url, analysisType = "basic") {
4446
output: "json",
4547
onlyCategories: categories,
4648
port: chrome.port,
49+
// Analiz hızını artıracak ayarlar
50+
disableStorageReset: true, // Depolama temizliğini devre dışı bırak
51+
formFactor: "desktop", // Masaüstü analizi daha hızlı
52+
throttlingMethod: "simulate", // Simüle edilmiş throttling daha hızlı
53+
screenEmulation: {
54+
disabled: true, // Ekran emülasyonunu devre dışı bırak
55+
},
56+
// Ekran görüntüsü denetimleri ve görsel öğeleri devre dışı bırak
57+
skipAudits: [
58+
"screenshot-thumbnails",
59+
"final-screenshot",
60+
"full-page-screenshot",
61+
"uses-optimized-images",
62+
"uses-webp-images",
63+
"uses-responsive-images",
64+
"offscreen-images",
65+
],
4766
};
4867

4968
// Lighthouse'u çalıştır (default export'u kullanarak)

0 commit comments

Comments
 (0)