docs: Lighthouse CI on Vercel preview deploys#3
Closed
havardljohansen wants to merge 3 commits into
Closed
Conversation
Genericized writeup for setting up Lighthouse CI on a Next.js app on Vercel, paired with the merkur-frontend pilot (PR #94). Captures the five common gotchas (preview-build race, runner variance, PWA score drag, single-URL coverage, auth/draft pages) and the pilot-week "warn first, tighten later" approach. Lands in docs/ next to roadmap.md so it's discoverable from the contributor side. Closing section frames it as complementary to Henrik's PR frontkom#2 (run-Lighthouse-from-task), not in competition: the .lighthouserc.cjs page list is the same list improve-performance would target if pointed at the repo. Requested by Per Andre via #night-shift Slack thread. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The trigger (deployment_status) and the LHCI config are platform-level, not framework-level. Title + intro were narrower than the actual content. Same workflow applies to Astro, Remix, Nuxt, plain static, etc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Forgot to stage the content edit in the rename commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Closing in favor of new PR opened from frontkom branch (write access granted by Per Andre, no longer need fork). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
docs/lighthouse-ci-nextjs.md— a copy-pasteable writeup for setting up Lighthouse CI on a Next.js app deployed on Vercel.Requested in the #night-shift Slack thread (Per Andre: "Do you have a writeup or skill on how to set up Lighthouse CI on a Next project so I can replicate it on my side?").
What it covers
.lighthouserc.cjs) with inline comments explaining every non-obvious choice.pull_requesttrigger races Vercel's preview build → usedeployment_statusnumberOfRuns: 3+ medianlighthouse:no-pwapreset on day one/only → expliciturlsarraywarn→error, add preset, make a required check.Why a separate doc, not a manifest task
This is infrastructure setup — a one-time per-repo configuration. Once LHCI is running, the audit task PR #2 can consume its signal (or its own fresh runs). The doc explicitly frames itself as complementary to #2, not in competition.
Pilot reference
frontkom/merkur-frontend#94is the working pilot the doc is genericized from.Test plan
urlsplaceholder + comments are genericized.