Encoutering MIME type ('text/html')

I am using service worker registeration and it works fine. when I implement a change at .stylus of my code base then refresh the web page, it try to install a new service worker but can not and appear an error :
The script has an unsupported MIME type (‘text/html’).
main.bundle.js:152 Service worker registration failed: DOMException: Failed to register a ServiceWorker for scope (‘https://…/out/quotes/’) with script (‘https://…/out/quotes/sw.js’): The script has an unsupported MIME type (‘text/html’).

please help me. thanks

Hello, what browser are you using and is sevice workers enabled, this is usually by default but depending on your browser you may need to set manually. Finally post the sorce code if possible so it can be checked on the forum.