From a41484cb35351fbf8e56d8ae35d8b47f24516a61 Mon Sep 17 00:00:00 2001 From: Dale Harvey Date: Sat, 4 Jan 2020 19:48:08 +0000 Subject: [PATCH] Add stub service worker so users can install on desktop with Chrome Signed-off-by: Dale Harvey --- res/sw.js | 1 + scripts/copy-res.js | 1 + src/vector/index.html | 5 +++++ 3 files changed, 7 insertions(+) create mode 100644 res/sw.js diff --git a/res/sw.js b/res/sw.js new file mode 100644 index 0000000000..038b82c9b4 --- /dev/null +++ b/res/sw.js @@ -0,0 +1 @@ +self.addEventListener('fetch',() => {}); diff --git a/scripts/copy-res.js b/scripts/copy-res.js index 00e0cb7ff0..b524062bf6 100755 --- a/scripts/copy-res.js +++ b/scripts/copy-res.js @@ -58,6 +58,7 @@ const INCLUDE_LANGS = [ // "dest/b/...". const COPY_LIST = [ ["res/manifest.json", "webapp"], + ["res/sw.js", "webapp"], ["res/welcome.html", "webapp"], ["res/welcome/**", "webapp/welcome"], ["res/themes/**", "webapp/themes"], diff --git a/src/vector/index.html b/src/vector/index.html index 130e34259e..fc880633e8 100644 --- a/src/vector/index.html +++ b/src/vector/index.html @@ -41,6 +41,11 @@ window.vector_indexeddb_worker_script = '<%= htmlWebpackPlugin.files.chunks['indexeddb-worker'].entry %>'; +