From ce22606bf3add3012b200b2071860a5920f0b634 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Thu, 23 Oct 2025 18:54:32 +0200 Subject: [PATCH] build: unify lighthouse config --- .github/workflows/lighthouse-ci.yml | 2 -- tools/lighthouse/.lighthouserc.json | 51 ++++++++++++++++++++++++++++- tools/lighthouse/budget.json | 49 --------------------------- 3 files changed, 50 insertions(+), 52 deletions(-) delete mode 100644 tools/lighthouse/budget.json diff --git a/.github/workflows/lighthouse-ci.yml b/.github/workflows/lighthouse-ci.yml index bd287bbf0..f02bf4e32 100644 --- a/.github/workflows/lighthouse-ci.yml +++ b/.github/workflows/lighthouse-ci.yml @@ -41,5 +41,3 @@ jobs: temporaryPublicStorage: true # Run 3 times for consistency runs: 3 - # Configure budgets - budgetPath: './tools/lighthouse/budget.json' diff --git a/tools/lighthouse/.lighthouserc.json b/tools/lighthouse/.lighthouserc.json index a9c5d1637..c34dda9b0 100644 --- a/tools/lighthouse/.lighthouserc.json +++ b/tools/lighthouse/.lighthouserc.json @@ -3,7 +3,56 @@ "collect": { "staticDistDir": "./dist", "numberOfRuns": 3, - "url": ["http://localhost/browser/index.html"] + "url": ["http://localhost/browser/index.html"], + "budgets": [ + { + "path": "/*", + "resourceSizes": [ + { + "resourceType": "script", + "budget": 1200 + }, + { + "resourceType": "stylesheet", + "budget": 100 + }, + { + "resourceType": "image", + "budget": 300 + }, + { + "resourceType": "font", + "budget": 100 + }, + { + "resourceType": "total", + "budget": 1500 + } + ], + "resourceCounts": [ + { + "resourceType": "script", + "budget": 100 + }, + { + "resourceType": "stylesheet", + "budget": 10 + }, + { + "resourceType": "image", + "budget": 50 + }, + { + "resourceType": "font", + "budget": 10 + }, + { + "resourceType": "total", + "budget": 150 + } + ] + } + ] }, "assert": { "preset": "lighthouse:no-pwa", diff --git a/tools/lighthouse/budget.json b/tools/lighthouse/budget.json deleted file mode 100644 index d5500be38..000000000 --- a/tools/lighthouse/budget.json +++ /dev/null @@ -1,49 +0,0 @@ -[ - { - "path": "/*", - "resourceSizes": [ - { - "resourceType": "script", - "budget": 1200 - }, - { - "resourceType": "stylesheet", - "budget": 100 - }, - { - "resourceType": "image", - "budget": 300 - }, - { - "resourceType": "font", - "budget": 100 - }, - { - "resourceType": "total", - "budget": 1500 - } - ], - "resourceCounts": [ - { - "resourceType": "script", - "budget": 100 - }, - { - "resourceType": "stylesheet", - "budget": 10 - }, - { - "resourceType": "image", - "budget": 50 - }, - { - "resourceType": "font", - "budget": 10 - }, - { - "resourceType": "total", - "budget": 150 - } - ] - } -]