Skip to content

Configure base URL for GitHub Pages subdirectory deployment#16

Merged
kehwar merged 3 commits into
mainfrom
copilot/fix-github-pages-deploy-issues
Feb 4, 2026
Merged

Configure base URL for GitHub Pages subdirectory deployment#16
kehwar merged 3 commits into
mainfrom
copilot/fix-github-pages-deploy-issues

Conversation

Copilot AI commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Assets are loading from root domain (https://kehwar.github.io/_nuxt/...) instead of repository subdirectory (https://kehwar.github.io/wallet/_nuxt/...), causing 404s on deployed site.

Changes

  • Nuxt config: Set app.baseURL to /wallet/ in production, / in development
  • PWA manifest: Update start_url to match base URL
  • Service worker: Update workbox navigateFallback to match base URL

All use process.env.NODE_ENV === 'production' conditional to preserve local development workflow.

app: {
  baseURL: process.env.NODE_ENV === 'production' ? '/wallet/' : '/',
  // ...
},
pwa: {
  manifest: {
    start_url: process.env.NODE_ENV === 'production' ? '/wallet/' : '/',
    // ...
  },
  workbox: {
    navigateFallback: process.env.NODE_ENV === 'production' ? '/wallet/' : '/',
    // ...
  }
}

Generated HTML will reference /wallet/_nuxt/entry.*.css instead of /_nuxt/entry.*.css.

Original prompt

Deploy action to github pages results ok

But on opening the site I get

wallet/:1 GET https://kehwar.github.io/_nuxt/entry.Bniov9FE.css net::ERR_ABORTED 404 (Not Found)
wallet/:1 GET https://kehwar.github.io/_nuxt/CleRJAhL.js net::ERR_ABORTED 404 (Not Found)
favicon.ico:1 GET https://kehwar.github.io/favicon.ico 404 (Not Found)

and a blank page


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 4, 2026 22:01
Co-authored-by: kehwar <45218102+kehwar@users.noreply.github.com>
Co-authored-by: kehwar <45218102+kehwar@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix GitHub Pages deployment errors for missing assets Configure base URL for GitHub Pages subdirectory deployment Feb 4, 2026
Copilot AI requested a review from kehwar February 4, 2026 22:03
@kehwar kehwar marked this pull request as ready for review February 4, 2026 23:41
@kehwar kehwar merged commit dc33ab5 into main Feb 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants