๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

Python/Flask

[Python] Flask - Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.

๋ฐ˜์‘ํ˜•

<script type="module"> ์“ฐ๋Š”๋ฐ ์˜ค๋ฅ˜ ๋ฐœ์ƒ ใ… ใ… 

 

 

Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.

 

 

 

import mimetypes
mimetypes.add_type('application/javascript', '.mjs')

 

 

 

 

 

 

 

 

stackoverflow.com/questions/56587108/flask-how-to-use-es6-modules/62236927#62236927

 

Flask: How to use ES6 modules?

I have a working Flask app that I'm trying to refactor to use ES6 imports. I don't need it to run on old browsers, and ES6 imports work in modern browsers without transpilation, right? I'm just r...

stackoverflow.com

 

๋ฐ˜์‘ํ˜•