I'm using a service worker with https not https for my angular 4 project. But I get this error : Service Worker registration failed: DOMException: Failed to register a ServiceWorker: An SSL certificate error occurred when fetching the script.
Here is my service-worker.js
module.exports = {
navigateFallback: '/index.html',
stripPrefix: 'dist',
root: 'dist/',
staticFileGlobs: [
'dist/index.html',
'dist/**.js',
'dist/**.css',
'dist/assets/image/**.*',
'dist/assets/image/client-home-carousel/**.*',
]
};
An in angular-cli.json:
"assets": [
"assets",
"favicon.ico",
"service-worker.js"
],