From 8c752e6e2738b6682b690d540835ab6ffafc6974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Misty=20De=20M=C3=A9o?= Date: Wed, 29 Jul 2026 17:59:54 -0700 Subject: [PATCH] docs: document using local wabac.js (#539) I realized this wasn't documented, and I thought it'd be helpful to provide the nudge for anyone else who needs to test it. --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index c2ad33d..1478467 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,14 @@ The package provides various commands that can be used with yarn/npm. Some usefu - `yarn dist` - to build production assets + Electron app (in dist/) +#### Testing with a local wabac.js + +The easiest way to test changes from a local checkout of [wabac.js](https://github.com/webrecorder/wabac.js) is to use the static site (see below) and overwrite the generated `sw.js` with a copy you've built from your local copy of wabac.js: + +1. In your checkout of wabac.js, run `yarn build-dev`. +2. Overwrite this repository's copy of `sw.js` with the copy from wabac.js; for example: `cp ../dist/sw.js .` +3. Serve the static site using any HTTP server; for example: `http-server -p 9990` or `python3 -m http.server 9990` + ### Static Site The static assets are placed in the root `index.html`, `sw.js`, and `ui.js`, and can be used with any HTTP server. This provides the core ReplayWeb.page functionality.