I have a small svelte-application, that is accessed through a reverse proxy. The app is accessed under a path, like http://host/appname, and the proxy rule fetches content from http://localhost:port. The svelte-app is listening to the same port.
When I load http://host/appname/index.html, the file is fetched as expected, but the js and css bundles have an absolute path, like '/bundle.js'. This makes the browser trying to fetch http://host/bundle.js, which of course fails. If the links in index.html were relative, like './bundle.js', things would work better, since the browser would expand it to http://host/appname/bundle.js, which is where the files are.
How can I make svelte produce relative paths to my bundles?