diff --git a/scripts/build.mjs b/scripts/build.mjs index 29a4bb54..ef043135 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -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(); diff --git a/src/platform/web/service-worker.template.js b/src/platform/web/service-worker.js similarity index 100% rename from src/platform/web/service-worker.template.js rename to src/platform/web/service-worker.js diff --git a/sw.js b/sw.js new file mode 120000 index 00000000..edcb3642 --- /dev/null +++ b/sw.js @@ -0,0 +1 @@ +src/platform/web/service-worker.js \ No newline at end of file