build(docs): try playwright-aws-lambda

This commit is contained in:
Eric Liu 2020-10-07 12:14:58 -07:00
commit 9f09d893da
3 changed files with 118 additions and 11 deletions

View file

@ -1,6 +1,6 @@
const sirv = require("sirv");
const polka = require("polka");
const { chromium } = require("playwright");
const playwright = require("playwright-aws-lambda");
const fs = require("fs-extra");
const path = require("path");
@ -41,11 +41,7 @@ const app = polka()
process.exit(1);
}
const browser = await chromium.launch({
headless: true,
chromiumSandbox: false,
args: ["--no-sandbox", "--disable-setuid-sandbox"],
});
const browser = await playwright.launchChromium();
const context = await browser.newContext();
const page = await context.newPage();