import mql from '@microlink/mql' const { data } = await mql('https://css-tricks.com/nerds-guide-color-web', { insights: { lighthouse: true } })
lighthouse
Type:
Default: true
boolean | object
Default: true
It returns a web performance report over the target url, powered by
Lighthouse
.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'
:import mql from '@microlink/mql' const { data } = await mql('https://css-tricks.com/nerds-guide-color-web', { insights: { lighthouse: { output: "html" } } })
Any
Lighthouse configuration
setting is supported:import mql from '@microlink/mql' const { data } = await mql('https://css-tricks.com/nerds-guide-color-web', { insights: { lighthouse: { onlyCategories: [ "accesibility" ] } } })
You can use
'preset'
to load a set of specific Lighthouse settings at once:import mql from '@microlink/mql' const { data } = await mql('https://css-tricks.com/nerds-guide-color-web', { insights: { lighthouse: { preset: "desktop" } } })
The following presets are supported: