{"id":13588793,"url":"https://github.com/dvelasquez/lighthouse-plugin-crux","last_synced_at":"2025-04-11T18:07:42.671Z","repository":{"id":37048922,"uuid":"322517133","full_name":"dvelasquez/lighthouse-plugin-crux","owner":"dvelasquez","description":"A Lighthouse plugin that gathers field data from the Chrome User eXperience Report","archived":false,"fork":false,"pushed_at":"2025-04-10T13:30:35.000Z","size":4086,"stargazers_count":17,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T18:04:37.501Z","etag":null,"topics":["crux","lighthouse","lighthouse-plugin","real-user-monitoring","score","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dvelasquez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-18T07:07:00.000Z","updated_at":"2025-04-10T13:30:39.000Z","dependencies_parsed_at":"2024-03-10T01:25:08.962Z","dependency_job_id":"225366b6-560c-4e80-850c-31ea948f18b7","html_url":"https://github.com/dvelasquez/lighthouse-plugin-crux","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvelasquez%2Flighthouse-plugin-crux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvelasquez%2Flighthouse-plugin-crux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvelasquez%2Flighthouse-plugin-crux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvelasquez%2Flighthouse-plugin-crux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dvelasquez","download_url":"https://codeload.github.com/dvelasquez/lighthouse-plugin-crux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248456373,"owners_count":21106602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crux","lighthouse","lighthouse-plugin","real-user-monitoring","score","typescript"],"created_at":"2024-08-01T15:06:56.100Z","updated_at":"2025-04-11T18:07:42.641Z","avatar_url":"https://github.com/dvelasquez.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# lighthouse-plugin-crux\n\n\u003e A Lighthouse plugin that displays the field performance of your page.\n\u003e It uses real-world data from Chrome UX Report and Core Web Vitals to estimate the score.\n\n[An example report for github.com/GoogleChrome/lighthouse](https://googlechrome.github.io/lighthouse/viewer/?gist=cb20232dcc7a8b4e93d63ae3b09ac47e):\n\n![An image with the result of an execution using the lighthouse-plugin-crux](./assets/plugin-result.jpg \"Lighthouse Plugin CrUX\")\n\nThis plugin adds Core Web Vitals values to your Lighthouse report. The CrUX Performance category includes real-user data\nprovided by [Chrome UX Report](https://developers.google.com/web/tools/chrome-user-experience-report/). It's similar to \nthe field section in [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) but it uses the Chrome\nUser Experience Report API instead of the PageSpeed Insights API. This API is faster than the PSI API since it doesn't \nneed run a full lighthouse run to give the results.\n\nThe scoring algorithm weighs values for Largest Contentful Paint (LCP), First Input Delay (FID), and Cumulative Layout \nShift (CLS) and picks a **minimum score**. It uses Core Web Vitals assessment that expects all its metrics to pass \nthresholds. For example, https://edition.cnn.com/ has LCP 5.9 s (15), FID 20 ms (100), and CLS 0.02 (100). It has \n`poor` mark in the [Search Console](https://support.google.com/webmasters/answer/9205520), and the score is 15. \n(_Note_: FCP and the origin values do not affect the score, [see the source](./src/plugin.ts))\n\nCheck out the parity between Field \u0026 Lab performance on mobile:\n\n\u003cimg width=\"973\" alt=\"Field \u0026 lab performance on mobile\" src=\"https://user-images.githubusercontent.com/158189/83353215-31b75b80-a351-11ea-801e-07f5a2b73e51.png\"\u003e\n\nAnd on desktop:\n\n\u003cimg width=\"972\" alt=\"Field \u0026 lab performance on desktop\" src=\"https://user-images.githubusercontent.com/158189/83353212-2ebc6b00-a351-11ea-9cf8-6a04a5f0f903.png\"\u003e\n\nSometimes field data is missing because a URL doesn't have enough anonymous traffic. In this case, the lab data is the only available measurement.\n\n## Install\n\nRequires Node.js `20+` and Lighthouse `10+`.\n\n```bash\n$ npm install lighthouse lighthouse-plugin-crux\n```\n\n## Usage\n\nUse the plugin with [Lighthouse CLI](https://github.com/GoogleChrome/lighthouse):\n\n```bash\n$ npx lighthouse https://www.apple.com/ --plugins=lighthouse-plugin-crux\n```\n\nIf you are using the --only-categories option in the CLI, you need to add the `lighthouse-plugin-crux` category to it:\n\n```bash\n$ npx lighthouse https://www.apple.com/ --plugins=lighthouse-plugin-crux --only-categories=performance,lighthouse-plugin-crux\n```\n\nProvide your [Chrome User Experience Report token](https://developers.google.com/web/tools/chrome-user-experience-report/api/guides/getting-started) to run more requests (in production) with a custom config:\n\n```bash\n$ npx lighthouse https://www.apple.com/ --config-path=./config.js\n```\n\n`config.js`\n\n```js\nexport default {\n  extends: 'lighthouse:default',\n  plugins: ['lighthouse-plugin-crux'],\n  settings: {\n    cruxToken: 'YOUR_REAL_TOKEN',\n  },\n}\n```\n\n## Credits\n\nHeavily based on the [lighthouse-plugin-field-data](https://github.com/treosh/lighthouse-plugin-field-performance)\n\n[![](https://img.shields.io/npm/v/lighthouse-plugin-crux.svg)](https://npmjs.org/package/lighthouse-plugin-crux)\n[![](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvelasquez%2Flighthouse-plugin-crux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdvelasquez%2Flighthouse-plugin-crux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvelasquez%2Flighthouse-plugin-crux/lists"}