Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions typescript/service-worker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@ To start the local development instance: `npm start`. This will start serving th

It's important to not use `webpack-dev-server` (even if it's available) as it is not fully compatible with Service Workers.


## Local develop with existing replica

**TESTED**

You will need to build the the repo first (see Build section above).

Start a replica in another place and set port to `devServer.proxy` inside `webpack.config.js` (default 8000)

Deploy any canister with type `assets` and copy canisterId

Start a dev mode webpack with `npm run develop`.

Open `http://localhost:8080/?canisterId=DEPLOYED_CANISTER_ID` in browser

After any change in service-worker source code make "reload without cache"

## Commit

You may find it useful to install a pre-commit hook that formats the code. See: `.husky/pre-commit`
Expand Down
Loading