05-配置好history模式的路由以后,刷新浏览器出现404

原因:

devServer里面没有配置historyApiFallback

解决方法:

const devServer = {
    port: 8000,
    host: '0.0.0.0',
    historyApiFallback:{
      index:'/index.html'
    },
    overlay: {
        errors: true,
    },
    hot: true
}

  

posted @ 2019-06-15 23:26  haines  阅读(439)  评论(0编辑  收藏  举报