puppeteer-web bundle created using browserify
Why?
- The bundlers fails to bundle puppeteer, and downloading puppeteer repo just to build puppeteer-web version seems like a hassle for quick development.
- Puppeteer team removed puppeteer-web from their repo in this PR
- The previous puppeteer could be found here on this commit, but it's a pain to build that as well.
- Lots of questions in stackoverflow like this shows the demand of such library.
Usage
yarn add puppeteer-web
import puppeteer from 'puppeteer-web';
async function run(){
const browser = await puppeteer.connect({
browserWSEndpoint: `ws://0.0.0.0:8080`,
ignoreHTTPSErrors: true
});
const pagesCount = (await browser.pages()).length;
const browserWSEndpoint = await browser.wsEndpoint();
console.log({ browserWSEndpoint, pagesCount });
}
Roadmap