本文共 436 字,大约阅读时间需要 1 分钟。
vue路由配置如下:
const router = new VueRouter({ mode: 'history', routes: [ { path: '*', component: NotFoundComponent } ]})
解决方案:
修改webpack的配置,
在vue.config.js文件中修改publicPath为 ‘/’ 即解决问题module.exports = { publicPath: '/', // <----这里就是会修改webpack的outPath.publicPath}
转载地址:http://ptkmf.baihongyu.com/