firq-dev-website/unlighthouse.config.ts

37 lines
926 B
TypeScript
Raw Permalink Normal View History

2025-02-06 18:31:18 +00:00
export default async () => {
const sitemap = await (await fetch('http://localhost:8081/sitemap-0.xml')).text()
const urls = sitemap.match(/<loc>(.*?)<\/loc>/g)!.map(
(loc) => loc.replace(/<\/?loc>/g, '').replace(/https:\/\/firq.dev/g, 'http://localhost:8081')
)
return {
2024-10-22 22:20:44 +00:00
lighthouseOptions: {
2025-02-06 18:31:18 +00:00
throttlingMethod: 'devtools',
throttling: {
cpuSlowdownMultiplier: 4,
requestLatencyMs: 150,
downloadThroughputKbps: 1638.4,
uploadThroughputKbps: 1638.4,
},
screenEmulation: {
width: 412,
height: 823,
deviceScaleFactor: 1.75,
},
2024-10-22 22:20:44 +00:00
},
2023-07-08 21:44:31 +00:00
puppeteerOptions: {
2025-02-06 18:31:18 +00:00
args: ['--no-sandbox', '--disable-setuid-sandbox'],
2023-07-08 21:44:31 +00:00
},
2023-07-08 21:52:47 +00:00
ci: {
2025-02-06 18:31:18 +00:00
budget: 50,
buildStatic: true,
2023-07-08 21:52:47 +00:00
},
2024-10-21 20:36:12 +00:00
scanner: {
2025-02-06 18:31:18 +00:00
sitemap: true,
dynamicSampling: false,
samples: 3,
2024-10-21 20:36:12 +00:00
},
2025-02-06 18:31:18 +00:00
outputPath: 'unlighthouse-reports',
urls
}
2023-07-08 21:52:47 +00:00
}