失败提示:
Refused to execute script from ‘http://127.0.0.1:8081/media/xxx.js’ because its MIME type (‘text/plain’) is not executable, and strict MIME type checking is enabled.
解决方案:
在项目的settings.py文件末尾添加:
import mimetypes mimetypes.add_type('application/javascript', '.js')