3***@qq.com
3***@qq.com
  • 发布:2022-05-08 10:30
  • 更新:2024-04-22 15:44
  • 阅读:1475

uniapp项目配置了favicon.ico后,运行到浏览器后报错

分类:uni-app

uniapp项目配置了favicon.ico后,运行到浏览器后报错
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

2022-05-08 10:30 负责人:无 分享
已邀请:
5***@qq.com

5***@qq.com

解决了吗

2***@qq.com

2***@qq.com

怎样解决的,求助

  • 3***@qq.com (作者)

    在项目根目录下找到index.html文件,注释<script type="module" src="/main.js"></script>这行代码

    2022-10-11 08:52

Callme冒险王

Callme冒险王

我用index.html模版路径是 template.h5.html

<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
新增<link rel="shortcut icon" type="image/x-icon" href="static/logo.ico"> 重启后解决了

要回复问题请先登录注册