vue文件打包之后打开index.html发现一片空白

原因:打包之后的文件加载资源的路径不对

解决办法:

在vue.config.js文件中修改路径

module.exports = {
 publicPath: './'
}

如果router/index.js文件里面有mode: 'history’的话删去或者注释即可

你可能感兴趣的:(vue)