From 2866f5f4e1c419b46524723eaec0929e8590d384 Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Tue, 31 Oct 2017 00:25:57 -0700 Subject: [PATCH] =?UTF-8?q?rename=20`service-worker.js`=20=E2=80=94>=20`sw?= =?UTF-8?q?.js`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/setup.js | 2 +- src/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/setup.js b/config/setup.js index f80bb1c..f67abe3 100644 --- a/config/setup.js +++ b/config/setup.js @@ -29,7 +29,7 @@ module.exports = isProd => { new ExtractText('styles.[hash].css'), new SWPrecache({ minify: true, - filename: 'service-worker.js', + filename: 'sw.js', dontCacheBustUrlsMatching: /./, navigateFallback: 'index.html', staticFileGlobsIgnorePatterns: [/\.map$/] diff --git a/src/index.js b/src/index.js index bad72a5..6bb049d 100644 --- a/src/index.js +++ b/src/index.js @@ -13,7 +13,7 @@ init(); if (process.env.NODE_ENV === 'production') { // cache all assets if browser supports serviceworker if ('serviceWorker' in navigator && location.protocol === 'https:') { - navigator.serviceWorker.register('/service-worker.js'); + navigator.serviceWorker.register('/sw.js'); } // add Google Analytics