1、前提确认router路由模式是hash模式,如果是history模式注释即可
2、新建vue.config.js文件,在里面写入如下代码
module.exports = {
publicPath: './'
}
3、重新打包,再重新打包index.html文件打开刷新
1、前提确认router路由模式是hash模式,如果是history模式注释即可
2、新建vue.config.js文件,在里面写入如下代码
module.exports = {
publicPath: './'
}
3、重新打包,再重新打包index.html文件打开刷新