我正在嘗試將 vuejs 應用程式部署到 github 頁面。我關注了每個 stackoverflow 帖子,以及我在網上找到的每個教程。不管我做什么,頁面只顯示自述檔案。
github repo github頁面
我正在使用 gh-pages 分支。
包.json:
type here{
"name": "eller-front-end-resume",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"lint": "vue-cli-service lint",
"build": "vue-cli-service build",
"predeploy": "yarn build",
"deploy": "node scripts/gh-pages-deploy.js"
},
"dependencies": {
"@vue/composition-api": "1.4.6",
"axios": "0.26.0",
"core-js": "^3.6.5",
"execa": "latest",
"lodash": "4.17.21",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vuetify": "^2.6.4",
"vuex": "^3.4.0"
},
"devDependencies": {
"@types/lodash": "^4.14.180",
"@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0",
"@vue/cli-plugin-babel": "~4.5.7",
"@vue/cli-plugin-eslint": "~4.5.7",
"@vue/cli-plugin-router": "~4.5.7",
"@vue/cli-plugin-typescript": "~4.5.7",
"@vue/cli-plugin-vuex": "~4.5.7",
"@vue/cli-service": "~4.5.7",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/eslint-config-typescript": "^7.0.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^6.2.2",
"prettier": "^2.2.1",
"sass": "~1.32.0",
"sass-loader": "^10.0.0",
"typescript": "~4.1.5",
"vue-cli-plugin-vuetify": "~2.4.7",
"vue-template-compiler": "^2.6.11",
"vuetify-loader": "^1.7.0"
}
}
我花了太多時間研究并嘗試托管一個愚蠢/簡單的應用程式來展示我的祖母。請幫我。
我在 stackoverflow 和其他網站上關注了十幾個指南(是的,甚至是每個人都指向的那篇中等文章)。我期待看到我的應用程式運行,就好像我在我的機器上本地運行我的專案一樣。
uj5u.com熱心網友回復:
在 GitHub Pages 提供的檔案夾中,您似乎沒有通過 vue 構建的檔案。轉到 GitHub 中的存盤庫設定并選擇“頁面”。在那里,您可以切換分支和分支中應提供服務的檔案夾。目前只允許使用“/”(根)或“/docs”。請參閱關于此的 GitHub Pages 檔案
對于您的用例,在構建頁面/更改編譯器中的輸出檔案夾后將其更改為“/docs”并將“dist”檔案夾重命名為“docs”應該可以解決問題。請注意,在更改此內容后,新的 index.html 而非當前的自述檔案將需要幾分鐘的時間。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/449817.html
標籤:Vue.js github Vuetify.js github页面
下一篇:不同分支中的git子模塊
