最近开始学习Nuxt.Js
并面临在 GitHub Pages 上部署的问题。
我按照说明做所有事情:
https://medium.com/@kozyreva.hanna/nuxt-js-gh-pages-deployment-73b88aa3aa65
无限nuxt-loading
出现在 gh-pages
而不是内容。
GitHub:https://github.com/Owe7x/slide
GH-页面:https://owe7x.github.io/slide/
可能是什么问题呢?
最佳答案
我已经尝试遵循这些步骤,但它们对我不起作用,经过一些研究,我最终采用了以下步骤:
dist
条目来自 .gitignore
文件 npm run generate
git add .
然后 git commit -m "deploy on gh-pages"
nuxt.config.js
中添加路由器基本配置: target: 'static',
router: {
base: '/<repository-name>/'
}
git subtree push --prefix dist origin gh-pages
确保删除当前
gh-pages
在运行这些命令之前分支。
关于vue.js - 在 GitHub Pages 中部署 Nuxt.js 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65250206/