Serving Vue.js Apps on GitHub Pages
blog.usmanity.com
blog.usmanity.com
Your additional point about force pushing is a good one also. While I’ve been using separate branch I’ve still been commiting each new build as a new commit. But overwriting the initial commit makes a lot more sense actually.
https://jsfiddle.net/chrisvfritz/50wL7mdz/
I find developing without a server side build process much more lightweight and enjoyable.
My example app is pretty contrived but I was mostly running into this issue when I had a multi-component app. An example is another repo I was working on: https://github.com/usmanity/prompt/tree/master/src
I guess, I should've prefaced my blog post with that :p
- Vue with no build (see e.g. https://github.com/stared/interactive-machine-learning-list)
- build -> push to a separate, orphan branch:
https://medium.com/@codetheorist/vue-up-your-github-pages-th...
Pushing binaries to the same branch is a very, very bad git practice.
1. https://medium.com/javascript-in-plain-english/i-created-the...
Also, excellent docs.
We have used Vue at my company for almost three years now. Love it.
You can just open "index.html" in your browser and it will run fine, as longs as the paths inside your files are relative.
You might have to reconfigure your bundler. If you're using Parcel, just pass `--public-url .` as a command line option when building. For Webpack use the publicPath configuration, etc.
But remember that pages accessed via file:/// have limited permissions: you can't use localStorage, access some sites using CORS, can't capture audio/video, etc. But if you're not using these things then it's fine.
[0] https://cli.vuejs.org/guide/deployment.html#github-pages
Much better imo