Niggly thing but JS breaks if not corrected.
Change this.
.then(function(){
console.log('Service worker is ready, and assets are cached');
});
);
To this.
.then(function(){
console.log('Service worker is ready, and assets are cached');
}));
Or better…
.then(() => {
console.log(‘Service worker is ready, and assets are cached’);
}));