In #5750 we removed the puppeteer-web bundle as it wasn't properly supported and we didn't want to continue shipping it. However we think it's important to ship a web bundle that could be used in a browser and this issue will track work in that area. There is no current timescale set for this work.
The current focus for this work is to go through Puppeteer's core and pull out the parts that explicitly depend on Node. Most of these are for features we wouldn't support in a web based Puppeteer (e.g. downloading a browser, or launching one!) so we need to work to split the codebase up into those parts. Currently in src we have common and node but there is code in common that has a dependency on Node which should not be the case.
Running npm run generate-dependency-graph will generate a diagram of dependencies and it's this that we need to work on. Once that is done the work then becomes:
Ship an ESM build of Puppeteer. As of chore(agnostic): ship CJS and ESM builds #6095 this is landed, but we don't point anyone to it. The web build should ship as ESM, not CJS. Once that version is released we can dog-food it. (Note to anyone reading: we are not supporting the ESM version as a first class citizen yet, so please do not start to use it. It may break at any time). Long term once we only support Nodes that support ESM we can ship ESM and remove CJS.
Create web based tests for the Puppeteer web version that mimic the Node tests we have now.
Decide on how to publish the web version - under puppeteer but as import X from 'puppeteer/web' ? Or a separate npm package? Or just as puppeteer and let bundlers decide which to use?
What does this mean for puppeteer-core ? Is that useful in its own right?
Create separate documentation for the web based version.
The text was updated successfully, but these errors were encountered:
In #5750 we removed the puppeteer-web bundle as it wasn't properly supported and we didn't want to continue shipping it. However we think it's important to ship a web bundle that could be used in a browser and this issue will track work in that area. There is no current timescale set for this work.
The current focus for this work is to go through Puppeteer's core and pull out the parts that explicitly depend on Node. Most of these are for features we wouldn't support in a web based Puppeteer (e.g. downloading a browser, or launching one!) so we need to work to split the codebase up into those parts. Currently in
src
we havecommon
andnode
but there is code incommon
that has a dependency on Node which should not be the case.Running
npm run generate-dependency-graph
will generate a diagram of dependencies and it's this that we need to work on. Once that is done the work then becomes:puppeteer
but asimport X from 'puppeteer/web'
? Or a separate npm package? Or just aspuppeteer
and let bundlers decide which to use?puppeteer-core
? Is that useful in its own right?The text was updated successfully, but these errors were encountered: