问题: 1.在vue项目中,build打包后,index页面打开会报错, MIME type ('text/html') ;报错内容:because its MIME type ('text/html') is not a supported stylesheet MIME type2.控制台报错:报错内容:http://127.0.0.1:5500/static/css/app.04f46711e76646577281177c721d6432.css 这个地址Cannot GET 解决思路:
在命令行直接运行 npm run build后,生成的dist文件中,直接打开index.html文件 Tip: built files are meant to be served over an HTTP server. Opening index.html over file:// won't work. 打包完后,提示只能在服务端可以开启,file模式下无法工作 问题: 使用vue脚手架开发的spa项目,在打包为app时,出现白屏现象 原因: 想要在手机端打开,等同于在本地file模式下