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 - } - ] - } -]