Skip to content

support serving via a Relative base url #5966

@chrisdrackett

Description

@chrisdrackett

Which project does this relate to?

Start

Describe the bug

I have an app that is running in an iFrame within another app (home assistant).

Because of this I need to use relative URLs for my assets otherwise things will not resolve because they hit the server of the host app.

I've tried setting base: "./", in my vite config, and also I have SPA enabled to keep things as simple as possible. When I check my _start.html my links look like the following:

href="/./assets/main-aAavoY_p.js"

so I don't get a relative url and the page breaks.

Your Example Website or App

na

Steps to Reproduce the Bug or Issue

  1. create a default app
  2. serve within an iframe of a host app
  3. 😭

Expected behavior

I would love to be able to use this router to build my addon (and in fact already have ;)) however I'm not able to deploy or ship it because I'm having a hard time getting it to run in the only environment its possible for it to run in.

Screenshots or Videos

No response

Platform

  • Router / Start Version: [e.g. 1.121.0]
  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Browser Version: [e.g. 91.1]
  • Bundler: [e.g. vite]
  • Bundler Version: [e.g. 7.0.0]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions