控制台报错
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.
查看请求的资源时候,发现路径是从当前页面开始的中间多了当前 '/路径'
解决方法:
就是在vite.config.js 中将base 基础路径改成 '/'
注意官方文档上写的是'./'