How sparticuz/chromium works
@sparticuz/chromium packages a serverless-ready Chromium runtime helper, not a browser automation framework. A consuming application obtains Chromium flags and an executable path, then gives both to Puppeteer or Playwright to launch Chromium. The package resolves bundled or caller-supplied assets, optionally downloads a remote pack, decompresses runtime files, and configures compatible Lambda environments. The README documents the -min remote-pack workflow and graphics controls; source excerpts show the implementation and its internal calls. The binary assets themselves are not present in the supplied tree, so they are represented only through the extraction component.
Main entry points: index.ts Chromium API · helper.ts Pack Download · paths.ts Bundle Path · lambdafs.ts Asset Decompression
Components 11
Runtime API
- Chromium API
source/index.ts - Launch Flags
source/index.ts - Graphics Mode
source/index.ts
Environment Setup
- Lambda Environment
source/helper.ts
Asset Preparation
- Bundle Path
source/paths.ts - Pack Download
source/helper.ts - Asset Decompression
source/lambdafs.ts
Other components
- Serverless App
- Puppeteer / Playwright
- Headless Chromium
- Remote Pack
Connections 12
- Serverless App → Chromium API: requests runtime
README.md - Chromium API → Lambda Environment: configures environment
source/index.ts - Chromium API → Bundle Path: resolves default path
source/index.ts - Chromium API → Pack Download: downloads remote pack
source/index.ts - Remote Pack → Pack Download: provides archive
README.md - Chromium API → Asset Decompression: decompresses assets
source/index.ts - Chromium API → Launch Flags: provides launch flags
README.md - Graphics Mode → Launch Flags: controls graphics flags
source/index.ts - Serverless App → Puppeteer / Playwright: launches through
README.md - Launch Flags → Puppeteer / Playwright: supplies arguments
README.md - Chromium API → Puppeteer / Playwright: supplies executable path
README.md - Puppeteer / Playwright → Headless Chromium: launches
README.md