cli
cli copied to clipboard
feat(plugin-lighthouse): add defaultChromeFlag exports
User story
ATM we have to use the plugin like this:
import lighthousePlugin from '@code-pushup/lighthouse-plugin';
import {DEFAULT_FLAGS} from 'chrome-launcher/dist/flags.js';
const config = {
// ...
await lighthousePlugin('https://github.com/code-pushup/cli/#readme', {
chromeFlags: DEFAULT_FLAGS.concat(['--headless']),
}),
}
I would prefere having it exported by us inc the headless on by default:
import lighthousePlugin, {DEFAULT_CHROME_FLAGS} from '@code-pushup/lighthouse-plugin';
const config = {
// ...
await lighthousePlugin('https://github.com/code-pushup/cli/#readme', {
chromeFlags: DEFAULT_CHROME_FLAGS, // this is the default it would work the same if omitted
}),
}
Acceptance criteria
- [ ]
@code-pushup/lighthouse-pluginexportsDEFAULT_CHROME_FLAGS - [ ]
DEFAULT_CHROME_FLAGSincludes--headless - [ ]
chromeFlagsby default are DEFAULT_CHROME_FLAGS,
Implementation details
No response