Reading the repo
Reading the repo
Assembly instructions
record and replay the web
Saved setup from 2 h ago
Will it work on my device?
CONTRIBUTING.mdWe want to make contributing to this project as easy and transparent as possible.
The majority of development on rrweb will occur through GitHub. Accordingly, the process for contributing will follow standard GitHub protocol.
We actively welcome your pull requests (PRs)!
main.We use GitHub issues to track public bugs. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue.
yarn/) yarn build:all or yarn dev/packages/rrweb) yarn repl/packages/rrweb) yarn live-streamyarn build or yarn devyarn test or yarn test:watchyarn test:webkit (in /packages/rrweb-snapshot)test/webkit-monkey-patched.test.ts is excluded from the regular yarn test run because it requires a Playwright WebKit browser binary. It is run separately via yarn test:webkit in packages/rrweb-snapshot.
macOS — install the browser once, then run directly:
npx playwright install webkit
yarn test:webkit
Linux — system library dependencies vary by distro. The most reliable approach is Docker (requires Docker to be installed):
# first time, or after changing rrweb-snapshot source: build the dist then the image
cd packages/rrweb-snapshot && yarn build && cd ../..
docker build -t rrweb-webkit-test -f Dockerfile.webkit-test .
# run rrweb-snapshot webkit tests
docker run --rm -e BROWSER=webkit rrweb-webkit-test \
yarn workspace rrweb-snapshot vitest run --config vitest.config.webkit.ts
# run rrweb webkit tests
docker run --rm -e BROWSER=webkit rrweb-webkit-test \
yarn workspace rrweb vitest run --config vitest.config.webkit.ts
# iterate on test file and/or dist without rebuilding the image
# (run `yarn build` in the relevant package first if you changed source)
docker run --rm -e BROWSER=webkit \
--mount type=bind,src=/absolute/path/to/rrweb/packages/rrweb-snapshot/dist/rrweb-snapshot.umd.cjs,dst=/work/packages/rrweb-snapshot/dist/rrweb-snapshot.umd.cjs \
--mount type=bind,src=/absolute/path/to/rrweb/packages/rrweb-snapshot/test/monkey-patched.test.ts,dst=/work/packages/rrweb-snapshot/test/monkey-patched.test.ts \
rrweb-webkit-test bash -c 'yarn workspace rrweb-snapshot vitest run --config vitest.config.webkit.ts'
The image is based on mcr.microsoft.com/playwright:v1.61.1-jammy which has all required system libraries pre-installed. The same image can be used to run webkit tests from any package in the monorepo by changing the yarn workspace command. Rebuild the image after updating the playwright package version or adding new test files.
yarn lintyarn format or yarn format:headSee documentation
rrweb is MIT licensed.
By contributing to rrweb, you agree that your contributions will be licensed under its MIT license.
Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
Needs Git: xcode-select --install
git clone https://github.com/rrweb-io/rrweb.git cd rrweb
Node.js lts
# needs nvm: brew install nvm (or https://github.com/nvm-sh/nvm) nvm install --lts
corepack enable yarn install
yarn dev
yarn test
No reports for macOS yet.
Claude reads the 10 key files and writes a step-by-step guide for macOS. Once written, it's saved for everyone.