Complete the code to import Lighthouse in an Astro project.
import [1] from 'lighthouse';
The correct import name is lighthouse to use the Lighthouse API in your Astro project.
Complete the code to run Lighthouse on a URL.
const result = await lighthouse('[1]');
You need to provide a full URL starting with https:// or http:// for Lighthouse to audit. https://example.com is a valid example.
Fix the error in the Lighthouse options object to enable performance category.
const options = { categories: { [1]: true } };The performance category must be set to true to audit performance metrics.
Fill both blanks to extract the performance score from Lighthouse results.
const score = result.lhr.[1].[2];
The performance score is found under result.lhr.categories.performance.
Fill all three blanks to create a summary object with performance score and URL.
const summary = { url: [1], score: result.lhr.categories.[2].[3] };The URL should be a string with quotes, here 'http://localhost:8080'. The score is under categories.performance.score.
