Skip to content

PWA manifest icons 404 — absolute paths ignore /gitverse/ base #9

Closed

Description

@opariffazman

Problem

PWA manifest icons 404 on live site. Console error:

Failed to load resource: 404 @ https://opariffazman.com/icons/icon-192.svg
Error while trying to use the following icon from the Manifest: https://opariffazman.com/icons/icon-192.svg

Manifest references /icons/icon-192.svg (absolute) but site served under /gitverse/ base. Real path is /gitverse/icons/icon-192.svg.

Cause

vite.config.ts PWA manifest hardcodes absolute icon paths:

icons: [
  { src: '/icons/icon-192.svg', sizes: '192x192', type: 'image/svg+xml' },
  { src: '/icons/icon-512.svg', sizes: '512x512', type: 'image/svg+xml' },
],

These ignore the base: '/gitverse/' set in the same config.

Fix

Prefix icon src with base, or make relative:

{ src: 'icons/icon-192.svg', ... }   // relative, resolves against base

Verify favicon + theme-color references too — same base issue may apply.

Impact

Cosmetic — only affects PWA install icon. App functions normally. Low priority.

Repro

  1. Open https://opariffazman.com/gitverse/
  2. DevTools console → 404 on icon-192.svg
  3. Application tab → Manifest → icon load error

Activity

  1. opariffazman commented on May 28, 2026

    @opariffazman
    CollaboratorAuthor

    Fixed in PR #10 — manifest icon src now uses relative paths (icons/...) so they resolve against the /gitverse/ base instead of the domain root. Verified the built manifest emits "src":"icons/icon-192.svg" with "scope":"/gitverse/".

  2. added a commit that references this issue on May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions