Back to posts

Using Lighthouse with Gatsby

Berkay Demirbas

Firstly you need to install Lighthouse.

npm install -g lighthouse

You should output all the results of the website you want to analyze in JSON format.

lighthouse --output json --output-path

You can use Gatsby JS to pull graphql queries.

Now, let's create our query and filter only the data we want. Lighthouse Graphql 2


You can then create a React-based report system that integrates the query we created with useStaticQuery in Gatsby.


Lighthouse GraphQL
© 2021, I use Cookie 🍪