Addon single page app does not get loaded

Hi Devs :wave:

I’m currently developing an addon that has a frontend served via ingress and built with vue + vuetify + vite, then bundled via “yarn build” and served via static webserver (Golang http.Fileserver).
Now the index.html correctly loads the first chunk index-g_zjWZ0n.js but this chunk (which loads other chunks) never gets executed and therefore I only see the basic page with correctly applied css formatting. If I don’t use ingress it works without problems.
Is someone here with experience in addon development with SPA frontends?
I also checked the code of esphome but I didn’t find any issue in my code.

set vite base: ‘’

I did and this first js from the assets folder is loaded correctly. This first js loads more js and css and this is what fails. It seems that the first js is not executed because I don’t even see any tries to load more resources in the network tab of the browsers developer tools.
Is there something special to consider because the ingress content is loaded within an iframe?

@jesserockz Do you have any hint for me as esphome dashboard works flawless with ingress? I compared the build setup of esphome dashboard with mine but did not find a hint.

I debugged like hell and finally found the problem if somebody else faces this.
Because the site is served under a subpath that is even dynamically generated by ingress I had to tell the vue router to use the current locations pathname

const router = createRouter({
  history: createWebHistory(window.location.pathname),
  routes,
})