From 01ea36c5aa0020fdccf335bf7a682fa96a509fd5 Mon Sep 17 00:00:00 2001 From: Barcode Betty Date: Mon, 30 Mar 2026 19:29:42 +0000 Subject: [PATCH] fix(lighthouse): use staticDistDir, drop Playwright dependency - lighthouserc.json: replace startServerCommand:npm-run-preview with staticDistDir:./dist so LHCI serves files directly - CI workflow: remove Playwright/Chromium install step and LHCI_CHROME_PATH env var (LHCI bundles its own Puppeteer) - LHCI now uses its built-in static server + bundled Chromium Co-Authored-By: Paperclip --- .github/workflows/ci.yml | 6 ------ lighthouserc.json | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62a77f6..3d028f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,13 +57,7 @@ jobs: cache: npm - run: npm ci - run: npm run build - - name: Install Chromium - run: | - npm install -g playwright - npx playwright install chromium - name: Run Lighthouse CI - env: - LHCI_CHROME_PATH: /home/runner/.cache/ms-playwright/chromium-1208/chrome-linux/chrome run: | npm install -g @lhci/cli lhci autorun diff --git a/lighthouserc.json b/lighthouserc.json index 0ef986a..76ac313 100644 --- a/lighthouserc.json +++ b/lighthouserc.json @@ -1,7 +1,7 @@ { "ci": { "collect": { - "startServerCommand": "npm run preview", + "staticDistDir": "./dist", "url": ["http://localhost:4173/"], "numberOfRuns": 1 },