Created by: jflayhart
Closes https://github.com/facebook/create-react-app/issues/8821
I would like to propose this change to take advantage of some great defaults Google gives us out of the box (pun intended) with their new V5 workbox plugin, however, I mainly want to remedy the issue Google fixes here.
This wonderful CRA library would be remiss if it did not stay up-to-date with Google's PWA best practices.
Verification
if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let s=Promise.resolve();return r[e]||(s=new Promise(async s=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=s}else importScripts(e),s()})),s.then(()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]})},s=(s,r)=>{Promise.all(s.map(e)).then(e=>r(1===e.length?e[0]:e))},r={require:Promise.resolve(s)};self.define=(s,i,t)=>{r[s]||(r[s]=Promise.resolve().then(()=>{let r={};const n={uri:location.origin+s.slice(1)};return Promise.all(i.map(s=>{switch(s){case"exports":return r;case"module":return n;default:return e(s)}})).then(e=>{const s=t(...e);return r.default||(r.default=s),r})}))}}define("./service-worker.js",["./workbox-c53a4ca0"],(function(e){"use strict";self.addEventListener("message",e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}),e.clientsClaim(),e.precacheAndRoute([{url:"/index.html",revision:"eb8bfb6bb64b366dba06a3f93435cbfa"},{url:"/static/css/main.5f361e03.chunk.css",revision:"1472653e7cd5f55fc8eabda93770382e"},{url:"/static/js/2.07a05dc4.chunk.js",revision:"68929f3a533ff0586c32b25eb95307aa"},{url:"/static/js/2.07a05dc4.chunk.js.LICENSE.txt",revision:"e88a3e95b5364d46e95b35ae8c0dc27d"},{url:"/static/js/main.4a6b0373.chunk.js",revision:"8362d8add8803304da898f2b30a532e9"},{url:"/static/js/runtime-main.549be430.js",revision:"79926b8e343973b253d98be461e9b89a"},{url:"/static/media/logo.5d5d9eef.svg",revision:"5d5d9eefa31e5e13a6610d9fa7a283bb"}],{}),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/_/,/\/[^\/?]+\.[^\/]+$/]}))}));
//# sourceMappingURL=service-worker.js.map