npm run build 上傳服務(wù)無(wú)法打開(kāi)頁(yè)面
1.在config -index.js文件下
將assetsPublicPath: '/'
改成assetsPublicPath: './',
2.如果有router的存在mode: 'history',請(qǐng)將刪除使用mode: 'hash', 但存在的問(wèn)題是會(huì)出現(xiàn)# 需要配合后端?
3.本地?zé)o法打開(kāi)? ? Tip: built files are meant to be served over an HTTP server.
?Opening index.html over file:// won't work.問(wèn)題
?下載npm install -g http-server 服務(wù)?
或者請(qǐng)看方式?https://blog.csdn.net/u013253924/article/details/81028423