lighthouse
Type:
Default: true
boolean | object
Default: true
It returns a web performance report over the target url, powered by
Lighthouse
.- CLI
- JavaScript
- Shell
- Python
- Ruby
const mql = require('@microlink/mql')
const { status, data } = await mql('https://css-tricks.com/nerds-guide-color-web', { insights: {lighthouse: true} })
mql.render(data)The report is serialized to JSON by default to make easy visualize it using
lighthouse.microlink.io
.Alternatively, you can serialize to
'html' or 'csv':- CLI
- JavaScript
- Shell
- Python
- Ruby
const mql = require('@microlink/mql')
const { status, data } = await mql('https://css-tricks.com/nerds-guide-color-web', { insights: {lighthouse: {output: 'html'}} })
mql.render(data)Any
Lighthouse configuration
setting is supported:- CLI
- JavaScript
- Shell
- Python
- Ruby
const mql = require('@microlink/mql')
const { status, data } = await mql('https://css-tricks.com/nerds-guide-color-web', { insights: {lighthouse: {onlyCategories: ['accesibility']}} })
mql.render(data)You can use
'preset' to load a set of specific Lighthouse settings at once:- CLI
- JavaScript
- Shell
- Python
- Ruby
const mql = require('@microlink/mql')
const { status, data } = await mql('https://css-tricks.com/nerds-guide-color-web', { insights: {lighthouse: {preset: 'desktop'}} })
mql.render(data)The following presets are supported: