user-flow icon indicating copy to clipboard operation
user-flow copied to clipboard

Puppeteer `BrowserOptions` overlaps with Lighthouse `Config`

Open BioPhoton opened this issue 2 years ago • 0 comments

To handle different device sizes we have different places to configure them:

  • Lighthouse Config
  • Puppeteer Browser

Lighthouse Config

const lighthouseConfig: Config = {
  extends: 'lighthouse:default',
  settings: {
    formFactor: 'desktop',      
    screenEmulation: {
      mobile: false,
      width: 1350,
      height: 940,
      deviceScaleFactor: 1,
      disabled: false
    }
  }
}

This setting applies to the browsers window not the viewport.

Puppeteer BrowserOptions

// 
const browserOptions: BrowserOptions = {
  defaultViewport: { 
  isMobile: false, 
  isLandscape: false, 
   width: 1350,
   height: 940,
  }
}

This setting applies to the Browsers viewport, not window.

BrowserOptions-vs-LhConfig

This issue is slightly connected with #142

BioPhoton avatar Apr 03 '23 13:04 BioPhoton