forked from mystiq/hydrogen-web
symlink service worker for local dev, so its scope captures whole app
also rename service worker (as it is not a template anymore)
This commit is contained in:
parent
a8ca82ca4d
commit
178790d816
3 changed files with 2 additions and 1 deletions
|
@ -90,7 +90,7 @@ async function build({modernOnly}) {
|
|||
await buildManifest(assets);
|
||||
// all assets have been added, create a hash from all assets name to cache unhashed files like index.html
|
||||
assets.addToHashForAll("index.html", devHtml);
|
||||
let swSource = await fs.readFile(path.join(projectDir, "src/platform/web/service-worker.template.js"), "utf8");
|
||||
let swSource = await fs.readFile(path.join(projectDir, "src/platform/web/service-worker.js"), "utf8");
|
||||
assets.addToHashForAll("sw.js", swSource);
|
||||
|
||||
const globalHash = assets.hashForAll();
|
||||
|
|
1
sw.js
Symbolic link
1
sw.js
Symbolic link
|
@ -0,0 +1 @@
|
|||
src/platform/web/service-worker.js
|
Loading…
Reference in a new issue