Fix Loading module from … was blocked because of a disallowed MIME type



This content originally appeared on DEV Community and was authored by chuongmep

This is simple way to fix :

  1. Find type format relate to the issue from console in web browser

  1. Add the code from python server, in my case I’m not able to load .mjs from source :
import mimetypes
mimetypes.add_type('text/javascript', '.mjs')


This content originally appeared on DEV Community and was authored by chuongmep