Skip to content

Instantly share code, notes, and snippets.

@kaangiray26
Last active January 30, 2024 14:14
Show Gist options
  • Save kaangiray26/d3bde2a1a59e58843ee2fef21b4e76b7 to your computer and use it in GitHub Desktop.
Save kaangiray26/d3bde2a1a59e58843ee2fef21b4e76b7 to your computer and use it in GitHub Desktop.
Deploying Vue.js to Github Pages

How to deploy your Vue.js app to GitHub Pages

Put the following into your vue.config.js:

module.exports = { publicPath: '/REPO/' }

Put the following into your vite.config.js:

...
export default defineConfig({
    base: '/REPO/',
    ...
})   

Now you can deploy your build to the gh-pages branch and damn the consequences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment