vue中使用iframe嵌套第三方页面,打卡页面为空白。控制台报错: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.
通过初步判断为资源拉取问题。打开控制台发现发现js文件的响应类型也为text/plain。
在iframe嵌套页面里面前端框架为vue3+vite,将vite.config.ts文件base属性修改为/,问题解决。
Failed to load module script: Expected a JavaScript module script but the server responded with a MI
最新推荐文章于 2024-09-12 15:48:02 发布