Lee*_*Lee 3 git github github-pages vue.js
我正在尝试将vue-cli项目部署到github页面,我按照本网站上的说明和github支持.
delpoy vue-cli到github页面:https://medium.com/@mwolfhoffman/deploying-to-github-pages-with-vue-webpack-cli-5b2ba17f14a0
配置github页面 https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/
设置 - >源 - >主/文档
在存储库的根目录中有一个/ docs文件夹
不遵循存储库命名方案username.github.io或orgname.github.io
这是我的存储库:https://github.com/leewei05/blog
但结果一直给我404,还不知道我的问题是什么,请帮忙!
原来我的配置路径错误,这里是将新的vue-cli项目部署到git hub页面的步骤.
(你必须先安装npm和vue-cli)
像这样修改你的构建部分:
build: {
index: path.resolve(__dirname, '../docs/index.html'),
assetsRoot: path.resolve(__dirname, '../docs'),
assetsSubDirectory: 'static',
assetsPublicPath: '',
productionSourceMap: true,
devtool: '#source-map',
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
bundleAnalyzerReport: process.env.npm_config_report
}
$ npm run build