在vue.config.js中配置publicPath,其中“<REPO>”是分支名,后面加上资源所在路径:html
module.exports = { publicPath: process.env.NODE_ENV === 'production' ? '/<REPO>/dist/' : '/' }
参考文档: https://cli.vuejs.org/zh/guide/deployment.html#github-pagesvue