Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking doc: creating environment-agnostic Puppeteer #6125

Closed
jackfranklin opened this issue Jun 30, 2020 · 1 comment
Closed

Tracking doc: creating environment-agnostic Puppeteer #6125

jackfranklin opened this issue Jun 30, 2020 · 1 comment
Assignees

Comments

@jackfranklin
Copy link
Collaborator

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:

  1. 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.
  2. Create web based tests for the Puppeteer web version that mimic the Node tests we have now.
  3. 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?
  4. What does this mean for puppeteer-core ? Is that useful in its own right?
  5. Create separate documentation for the web based version.
@Mohammed-Fayaz
Copy link

@jackfranklin is this task complete? Not clear if this effort to create environment agnostic puppeteer has been abandoned or is complete from this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants