1. 程式人生 > >Vue history/hash模式打包頁面空白處理

Vue history/hash模式打包頁面空白處理

 相信很多新手在history/hash模式下被坑的很慘,處理history模式下頁面打包空白,經測試ok

export default new Router({
  mode: 'history',  // history模式
  base: '/test',  //專案根目錄,這個配置很重要
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    }
  ]
})


//配置完成頁面history模式下打包OK