Problem

The nuxt sitelogo is loaded via /logo.svg - it's missing the theme base-url.

Steps to reproduce

Use the theme

Issue fork lupus_csr-3583555

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

fago created an issue. See original summary.

fago’s picture

This is not an easy fix. Options, summarized with AI:

  • Relative Vite base (vite.base: './'): All bundle paths become import.meta.url-relative, combined with a tag injection in lupus_csr this avoids all /_nuxt/ replacement fragility — but requires testing with Nuxt 4.
  • Build-time base URL (NUXT_APP_BASE_URL): Set the exact deployment path at build time — clean but defeats lupus_csr's purpose of not needing to know the path ahead of time.
  • Drupal route for /_nuxt/: lupus_csr serves /_nuxt/ from the theme's dist directory — not nice and not doable from a theme
  • Service Worker: Intercepts and rewrites /_nuxt/ requests at runtime — works but complex, requires HTTPS, hacky.
  • Workaround, inline the image

So none of the options is really good. So best, let's inline the logo for a nicely distributable image, document the issue and how-to-work aroudn it in other setups if the issue arises. Build nuxt with relative path.

fago’s picture

Title: Nuxt sitelogo is loaded from wrong path » Nuxt site-logo is loaded from wrong path

fago’s picture

Status: Active » Needs review

  • fago committed f5d9303a on 1.x
    fix: #3583555 Nuxt site-logo is loaded from wrong path
    
    By: fago
    
fago’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.