大卡:
我在使用“photo-sphere-viewer4 全景图插件应用”这篇文章的代码时,
在导入:
import { Viewer } from 'photo-sphere-viewer'
import { MarkersPlugin } from 'photo-sphere-viewer/dist/plugins/markers';
import { GalleryPlugin } from 'photo-sphere-viewer/dist/plugins/gallery';
import { VirtualTourPlugin } from 'photo-sphere-viewer/dist/plugins/virtual-tour';
网页刷新后,报错。F12后提示
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
如图
网上查询得知是模块加载出错,网上提供的方案如设置apatch服务等,都未能解决。
你遇到这种情况吗?根据你的经验,能否帮忙提供解决的方向和途径
致敬,昐回