publisher-ads-lighthouse-plugin
publisher-ads-lighthouse-plugin copied to clipboard
How do we use it programmatically?
I wanted to integrate this Plugin in the Lighthouse Library. No proper documentation is provided to do so
@connorjclark @jimper @jburger424 - Hi all. I have the same question and will grateful for the help.
My lighthouse config looks like.
After that, i should see lighthouse-plugin-publisher-ads
in categories
object. If i run lighthouse from command line, then generated json has lighthouse-plugin-publisher-ads
in categories
section. If i run it programatically, then lighthouse-plugin-publisher-ads
does not exists in generated json report in categories
object
runnerResult = await lighthouse(url, flags, configs, page)
configs object
{
"extends": "lighthouse:default",
"settings": {
"formFactor": "desktop",
"disableFullPageScreenshot": false,
"locale": "en",
"screenEmulation": {
"disabled": true
},
"onlyCategories": [
"performance",
"accessibility",
"best-practices",
"seo",
"pwa"
]
},
"plugins": [
"lighthouse-plugin-publisher-ads"
]
}
lighthouse-plugin-publisher-ads
is in package.json
"dependencies": {
"lighthouse": "^10.2.0",
"lighthouse-plugin-publisher-ads": "1.5.7-beta",
"puppeteer": "^19.9.1"
},
"overrides": {
"lighthouse-plugin-publisher-ads": {
"lighthouse": "$lighthouse"
}
}
thanks for the help.