Testing new unlighthouse shenanigans
This commit is contained in:
parent
eec488ddff
commit
4e4cf1b21a
2 changed files with 28 additions and 24 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@firq/fgosite",
|
"name": "@firq/fgosite",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.2.0-pre.60",
|
"version": "0.2.0-pre.61",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
|
|
|
@ -1,32 +1,36 @@
|
||||||
export default {
|
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 {
|
||||||
lighthouseOptions: {
|
lighthouseOptions: {
|
||||||
throttlingMethod: "devtools",
|
throttlingMethod: 'devtools',
|
||||||
throttling: {
|
throttling: {
|
||||||
cpuSlowdownMultiplier: 4,
|
cpuSlowdownMultiplier: 4,
|
||||||
requestLatencyMs: 150,
|
requestLatencyMs: 150,
|
||||||
downloadThroughputKbps: 1638.4,
|
downloadThroughputKbps: 1638.4,
|
||||||
uploadThroughputKbps: 1638.4,
|
uploadThroughputKbps: 1638.4,
|
||||||
},
|
},
|
||||||
screenEmulation: {
|
screenEmulation: {
|
||||||
width: 412,
|
width: 412,
|
||||||
height: 823,
|
height: 823,
|
||||||
deviceScaleFactor: 1.75,
|
deviceScaleFactor: 1.75,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
puppeteerOptions: {
|
puppeteerOptions: {
|
||||||
args: [
|
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
||||||
"--no-sandbox",
|
|
||||||
"--disable-setuid-sandbox"
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
ci: {
|
ci: {
|
||||||
budget: 50,
|
budget: 50,
|
||||||
buildStatic: true,
|
buildStatic: true,
|
||||||
},
|
},
|
||||||
scanner: {
|
scanner: {
|
||||||
sitemap: true,
|
sitemap: true,
|
||||||
dynamicSampling: false,
|
dynamicSampling: false,
|
||||||
samples: 3,
|
samples: 3,
|
||||||
},
|
},
|
||||||
outputPath: "unlighthouse-reports",
|
outputPath: 'unlighthouse-reports',
|
||||||
|
urls
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue