Custom SW filename (#175)

* embed: support using custom filename for service worker instead of sw.js
can be set via <replay-web-page swName='custom.js' ... > property
docs: update embedding docs to mention new option
fixes #160
This commit is contained in:
Ilya Kreymer
2023-06-14 17:06:51 -07:00
committed by GitHub
parent d767e6e164
commit d1e84b1b52
8 changed files with 1222 additions and 2663 deletions
+5
View File
@@ -247,6 +247,11 @@ class Embed extends LitElement
params.loading = "eager";
}
// eslint-disable-next-line no-undef
if (this.swName !== __SW_NAME__) {
params.swName = this.swName;
}
this.paramString = new URLSearchParams(params).toString();
this.hashString = new URLSearchParams({