@@ -27,10 +27,11 @@ const defaultArgs = [
2727 '--no-default-browser-check' , // https://source.chromium.org/search?q=lang:cpp+symbol:kNoDefaultBrowserCheck&ss=chromium
2828 '--no-pings' , // https://source.chromium.org/search?q=lang:cpp+symbol:kNoPings&ss=chromium
2929 '--no-sandbox' , // https://source.chromium.org/search?q=lang:cpp+symbol:kNoSandbox&ss=chromium
30+ '--no-startup-window' ,
31+ `--enable-features=${ [ 'SharedArrayBuffer' ] . join ( ',' ) } ` ,
3032 '--no-zygote' , // https://source.chromium.org/search?q=lang:cpp+symbol:kNoZygote&ss=chromium
3133 '--use-angle=swiftshader' , // https://chromium.googlesource.com/chromium/src/+/main/docs/gpu/swiftshader.md
3234 '--use-gl=angle' , // https://chromium.googlesource.com/chromium/src/+/main/docs/gpu/swiftshader.md
33- `--enable-features=${ [ 'SharedArrayBuffer' ] . join ( ',' ) } ` ,
3435 `--disable-features=${ [
3536 'AudioServiceOutOfProcess' ,
3637 'CalculateNativeWinOcclusion' ,
@@ -44,12 +45,21 @@ const defaultArgs = [
4445]
4546
4647const spawn = ( {
47- puppeteer = requireOneOf ( [ 'puppeteer' , 'puppeteer-core' , 'puppeteer-firefox' ] ) ,
48- mode = 'launch' ,
4948 args = defaultArgs ,
5049 headless = true ,
50+ ignoreHTTPSErrors = true ,
51+ mode = 'launch' ,
52+ puppeteer = requireOneOf ( [ 'puppeteer' , 'puppeteer-core' , 'puppeteer-firefox' ] ) ,
53+ waitForInitialPage = false ,
5154 ...launchOpts
52- } = { } ) => puppeteer [ mode ] ( { ignoreHTTPSErrors : true , args, headless, ...launchOpts } )
55+ } = { } ) =>
56+ puppeteer [ mode ] ( {
57+ args,
58+ headless,
59+ ignoreHTTPSErrors,
60+ waitForInitialPage,
61+ ...launchOpts
62+ } )
5363
5464const getPid = subprocess => {
5565 if ( 'pid' in subprocess ) return subprocess . pid
0 commit comments