Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't seem to install a custom service worker. #169

Open
joegaudet opened this issue Mar 21, 2020 · 2 comments
Open

Can't seem to install a custom service worker. #169

joegaudet opened this issue Mar 21, 2020 · 2 comments

Comments

@joegaudet
Copy link

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();
  });

}());
@joegaudet
Copy link
Author

I do see this log file:

Service Worker registration succeeded. Scope is http://concierge.food.foobar/swiftfox/

@makepanic
Copy link

If your consuming app adds a dev/dependency to your addon it should work out of the box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants