查看打包后頁面訪問路徑是否正確

路徑報(bào)錯(cuò)
解決辦法:
創(chuàng)建 vue.config.js 文件 添加一下內(nèi)容,重新打包就好了。
//vue.config.js 文件
module.exports = {
publicPath: './',
}
打包后頁面沒有報(bào)錯(cuò),但沒有內(nèi)容

頁面沒有內(nèi)容
解決辦法:
找到 router 文件夾 (路由文件夾) 把
mode: 'history'注釋掉 ,重新打包就好了。
const router = new VueRouter({
// mode: 'history',
routes
})