Skip to content

Commit bf61770

Browse files
committed
fix(lighthouse): pass flags
1 parent 31b1a93 commit bf61770

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/lighthouse/src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ const getConfig = require('./get-config')
55

66
module.exports =
77
getBrowserless =>
8-
async (url, { output = 'json', timeout, ...opts } = {}) => {
8+
async (url, { output = 'json', timeout, flags, ...opts } = {}) => {
99
let teardown
1010
const browserless = await getBrowserless(fn => (teardown = fn))
1111

1212
const fn = page => async () =>
1313
lighthouse({
14+
flags,
1415
config: await getConfig({ ...opts, output }),
1516
page,
1617
url

packages/lighthouse/src/lighthouse.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const lighthouse = require('lighthouse/core/index.cjs')
44

5-
module.exports = async ({ url, config, page }) => {
6-
const { lhr, report } = await lighthouse(url, undefined, config, page)
5+
module.exports = async ({ url, config, flags, page }) => {
6+
const { lhr, report } = await lighthouse(url, flags, config, page)
77
return config.settings.output === 'json' ? lhr : report
88
}

0 commit comments

Comments
 (0)