Skip to content
Discussion options

You must be logged in to vote

Short answer: No, the 404.html hack is no longer necessary for most cases.

GitHub Pages now supports single-page application routing natively if you use a custom 404.html that redirects to your index. But more importantly, if you're deploying to a custom domain (not username.github.io/repo), history mode works out of the box because GitHub Pages serves index.html for any path that doesn't match a file.

For username.github.io/repo deployments (project pages), you still need the 404.html trick since GitHub doesn't do SPA fallback on subpaths. Here's the minimal setup:

  1. Copy your dist/index.html to dist/404.html as part of your build:
// quasar.config.js
build: {
  afterBuild() {
    const fs 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by suntong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants