vue3+vite打包以后,项目切换路由触发(偶发触发)报:
After using vue-router, there is an error in packaging and running # Failed to load module script: The server responded with a non-JavaScript MIME type of “text/html”. Strict MIME type checking is enforced for module scripts per HTML spec.
Failed to fetch dynamically imported module…

确实应该是vite2.xx的bug After using vue-router, there is an error in packaging and running # Failed to load module script: The server responded with a non-JavaScript MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. · Issue #863 · vitejs/vite · GitHub
注意: 在使用vue3+vite时候,只发现vue-router切换时触发此现象

 

更多推荐