I am trying to setup a service worker on a page that I am hosting using a http python server locally but the registration process fails due to the following error:
The script has an unsupported MIME type (‘text/plain’)
.
Any ideas what the problem could be?
I am following a tutorial of the internet and reusing its code, so the chances of code errors are 0%. The directory structure is also correct, because the .js file is placed in the same directory as the .html file.