Skip to content

Commit b61abd8

Browse files
authored
Update README.md
1 parent 94bbb83 commit b61abd8

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
# Deploy Vue.js to GitHub pages
1+
# Deploy Vue.js app to GitHub pages
22

33
Original source: https://blog.logrocket.com/build-deploy-vue-js-app-github-pages/
44

5-
1.
5+
1. Follow above tutorial, probably. But TL;DR
6+
2. Integrate source folders/files with your app
7+
3. Modify `scripts/gh-pages-deploy.js` with your project name
8+
4. Commit & push to your `master` branch
9+
5. Run `npm run deploy` to deploy to GitHub pages
10+
11+
## What's different compared to LogRocket guide?
12+
GitHub doesn't support history mode in Vue.js within GitHub pages, so a workaround was to manually set this to `mode: 'hash'` within my project. The impact of this was hash mode was used everywhere, including on Prod. Not ideal. My modified `gh-pages-deploy.js` script finds/replaces this automatically prior to deploying to GitHub pages upon the `npm run deploy` command.
13+
14+
Secondly, as per guide above, a `vue.config.js` file is required along with setting a `publicPath` matching your GitHub pages project name. The impact was this was also affecting Prod as well. So as per above, my modified script also finds/replaces for you automatically.

0 commit comments

Comments
 (0)