Я следовал руководству , чтобы шаг за шагом развернуть приложение VueJS на страницах GitHub, и оно выдает ошибку GET https://jedrekdomanski.github.io/bikeramp-front/ 404 ()
Мое репо (gh-pages
ветка): https://github.com/jedrekdomanski/bikeramp-front/tree/gh-pages
Веб-сайт: https://jedrekdomanski.github.io/bikeramp-front/
скрипт
https://cli.vuejs.org/guide/deployment.html#github-pages
#!/usr/bin/env sh
# abort on errors
set -e
# build
npm run build
# navigate into the build output directory
cd dist
# if you are deploying to a custom domain
# echo 'www.example.com' > CNAME
git init
git add -A
git commit -m 'deploy'
# if you are deploying to https://<USERNAME>.github.io
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master
# if you are deploying to https://<USERNAME>.github.io/<REPO>
git push -f git@github.com:jedrekdomanski/bikeramp-front.git master:gh-pages
cd -
vue.config.js
module.exports = {
baseUrl: process.env.NODE_ENV === 'production'
? '/bikeramp-front/'
: '/'
}
Я обслуживаю приложение с gh-pages
, как они сказали.
Источник
Your GitHub Pages site is currently being built from the gh-pages branch.
Что я делаю не так?
package.json
{
...
"private": true,
"scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
"dependencies": {
"axios": "^0.18.0",
"chart.js": "^2.7.3",
"vue": "^2.4.4",
"vue-chartjs": "^3.4.0",
"vue-router": "^3.0.1",
"vuex": "^3.0.0"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.0",
"babel-preset-stage-2": "^6.24.1",
"cross-env": "^5.0.5",
"css-loader": "^0.28.11",
"file-loader": "^1.1.4",
"vue-loader": "^13.0.5",
"vue-template-compiler": "^2.4.4",
"webpack": "^3.6.0",
"webpack-dev-server": "^2.9.1"
}
}