mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-04 04:51:16 +08:00
moved sw.js to static
This commit is contained in:
parent
5facebe6bb
commit
fc3efc20a4
3 changed files with 3 additions and 3 deletions
|
@ -281,14 +281,14 @@ task("updateSwCacheName", function () {
|
|||
date.getMinutes() +
|
||||
"-" +
|
||||
date.getSeconds();
|
||||
return src(["static/sw.js"])
|
||||
return src(["static/js/sw.js"])
|
||||
.pipe(
|
||||
replace(
|
||||
/const staticCacheName = .*;/g,
|
||||
`const staticCacheName = "sw-cache-${dateString}";`
|
||||
)
|
||||
)
|
||||
.pipe(dest("./dist/"));
|
||||
.pipe(dest("./dist/js/"));
|
||||
});
|
||||
|
||||
task(
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
></script>
|
||||
<script>
|
||||
if ("serviceWorker" in navigator) {
|
||||
navigator.serviceWorker.register("sw.js");
|
||||
navigator.serviceWorker.register("js/sw.js");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
Loading…
Reference in a new issue