cordova+vue打包后空白问题

检查Vue项目

  1. 检查Config目录中index.js文件build的配置,参照一下配置
    // Template for index.html
    index: path.resolve(__dirname, '../dist/index.html'),

    // Paths
    assetsRoot: path.resolve(__dirname, '../dist'),
    assetsSubDirectory: '',
    assetsPublicPath: '',
  1. 更改Router路由的模式
const router = new VueRouter({
  mode: 'hash',
  routes: [...]
})

你可能感兴趣的:(cordova+vue打包后空白问题)