-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathunlighthouse.config.ts
39 lines (38 loc) · 1.02 KB
/
unlighthouse.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const config = {
site: process.env.DEPLOYMENT_URL,
urls: async () => {
const response = await fetch(
`${process.env.DEPLOYMENT_URL ?? ""}/sitemap.xml`,
);
const sitemap = await response.text();
return sitemap
.match(/<loc>(.*?)<\/loc>/g)
?.map((loc) => loc.replaceAll(/<\/?loc>/g, ""));
},
cache: false,
ci: {
reporter: "jsonExpanded",
buildStatic: true,
budget: {
performance: 80,
accessibility: 92, // minus point from links relying on colors to be distinguishable in /blog/:slug; info callout doesn't have enough contrast
"best-practices": 100,
seo: 60, // minus point from non-PROD not being indexable
},
},
extraHeaders: {
"x-vercel-protection-bypass": process.env.VERCEL_AUTOMATION_BYPASS_SECRET,
},
scanner: {
samples: 3,
},
lighthouseOptions: {
throttling: {
cpuSlowdownMultiplier: 8.6, // matches GitHub Action Ubuntu performance
},
},
puppeteerClusterOptions: {
maxConcurrency: 1,
},
};
export default config;