Adapt lighthouse

This commit is contained in:
Firq 2025-04-16 21:42:27 +02:00
parent f11a53cd11
commit e402b7e321
Signed by: Firq
GPG key ID: DCE182BA39C697B2
3 changed files with 15 additions and 11 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "@firq/fgosite", "name": "@firq/fgosite",
"version": "0.2.0-pre.104", "version": "0.2.0-pre.105",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@firq/fgosite", "name": "@firq/fgosite",
"version": "0.2.0-pre.104", "version": "0.2.0-pre.105",
"dependencies": { "dependencies": {
"@astro-community/astro-embed-youtube": "^0.5.6", "@astro-community/astro-embed-youtube": "^0.5.6",
"@astrojs/check": "^0.9.4", "@astrojs/check": "^0.9.4",

View file

@ -1,7 +1,7 @@
{ {
"name": "@firq/fgosite", "name": "@firq/fgosite",
"type": "module", "type": "module",
"version": "0.2.0-pre.104", "version": "0.2.0-pre.105",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "astro dev", "dev": "astro dev",

View file

@ -12,17 +12,21 @@ export default async (): Promise<UserConfig> => {
/* actual config */ /* actual config */
return { return {
lighthouseOptions: { lighthouseOptions: {
throttlingMethod: 'devtools', throttlingMethod: 'simulate',
throttling: { throttling: {
cpuSlowdownMultiplier: 4, rttMs: 150,
requestLatencyMs: 150, throughputKbps: 1638.4,
downloadThroughputKbps: 1638.4, requestLatencyMs: 562.5, // estimated latency at 150ms RTT
uploadThroughputKbps: 1638.4, downloadThroughputKbps: 1474.56,
uploadThroughputKbps: 675,
cpuSlowdownMultiplier: 4
}, },
screenEmulation: { screenEmulation: {
width: 412, mobile: true,
height: 823, width: 360,
deviceScaleFactor: 1.75, height: 640,
deviceScaleFactor: 2.625,
disabled: false
}, },
skipAudits: [ 'is-on-https', 'redirects-http', 'uses-http2' ], skipAudits: [ 'is-on-https', 'redirects-http', 'uses-http2' ],
}, },