ember-service-worker
ember-service-worker copied to clipboard
Can't seem to install a custom service worker.
Took the following steps:
ember install ember-service-worker
ember g service-worker
installing service-worker
create service-worker/index.js
I messed with index.js, don't see any changes propagated to the sw.js file that is installed, instead only have this default file.
(function () {
'use strict';
const VERSION = '1584820508745|0.03746710196290959';
self.CACHE_BUSTER = VERSION;
self.addEventListener('install', function installEventListenerCallback(event) {
return self.skipWaiting();
});
self.addEventListener('activate', function installEventListenerCallback(event) {
return self.clients.claim();
});
}());
I do see this log file:
Service Worker registration succeeded. Scope is http://concierge.food.foobar/swiftfox/
If your consuming app adds a dev/dependency to your addon it should work out of the box.