vue打包后空白,解决办法 第一步:将路由模式设置成hash模式 const router = new VueRouter({ mode: 'hash', }); 第二步:在代理vue.config.js文件下配置publicPath为'./' module.exports={ publicPath:'./', } 第三步:重新打包npm run build