https://gitcode.com/outsider123/demo2 demo代码仓库

- 发布:2025-05-22 08:47
- 更新:2025-05-22 08:47
- 阅读:34
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 23H2(0S内郚版本22631.4169)
HBuilderX类型: 正式
HBuilderX版本号: 4.66
手机系统: Android
手机系统版本号: Android 9.0
手机厂商: 模拟器
手机机型: 雷电模拟器
页面类型: nvue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
在Android 11 中运行项目,等待网页加载完成会发现没有执行main.js里的代码,控制台报
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.
切换为vue页面,控制台不会报错,背景正常更改为红色
在Android 11 中运行项目,等待网页加载完成会发现没有执行main.js里的代码,控制台报
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.
切换为vue页面,控制台不会报错,背景正常更改为红色
预期结果:
不会报错
不会报错
实际结果:
报Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.错误
报Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.错误
bug描述:
Android11中,在nvue页面使用webview嵌入本地页面时,如本地页面加载了type="module"的js文件时报
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.
0 个回复