As I am new to programming and currently learning JavaScript and Vue.js, I have been trying to deploy my first Vue.js app without success. Despite spending hours on it, I still cannot figure it out and need to seek assistance.
Every time I try to deploy, all I get is a blank page.
This is what my vue.config.js looks like:
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({ transpileDependencies: true,
publicPath:process.env.NODE_ENV === 'production'
?'/My-repo/'
: '/'
})
And here is an excerpt from my deploy.bat file:
# 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 <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3a5d534e7a5d534e524f5814595557">[email protected]</a>:<USERNAME>/<USERNAME>.github.io.git main
# if you are deploying to https://<USERNAME>.github.io/<REPO>
git push -f <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="46212f3206212f322e33246825292b">[email protected]</a>:myUsername/myRepository.git master:gh-pages
cd -
I appreciate any help or guidance in resolving this issue. Thank you.