Open Brett-Henning opened 4 years ago
I received the same error with pyton 3.8 localhost/:1 Uncaught (in promise) DOMException: Failed to register a ServiceWorker for scope ('http://localhost:3000/') with script ('http://localhost:3000/sw.js'): The script has an unsupported MIME type ('text/plain').
Unable to get the service worker to work in Codelab -> Adding a Service Worker and Offline into your Web App
if('serviceWorker' in navigator) { navigator.serviceWorker .register('/sw.js') .then(function() { console.log("Service Worker Registered"); }); }
Returns MINE error wrong type text/plainThis is using the Python server instructions provided python -m SimpleHTTPServer 3000