sveltejs/template

Relative paths for resources

Closed this issue · 2 comments

When deploying a Svelte site to GitHub Pages, I have to change the paths for the bundled files to be relative, e.g. /global.css to ./global.css.

Is there a downside to making them relative by default?

They're absolute by default for the benefit of people writing SPAs (where the same index.html is served for all initial page requests), which seemed to be the more common complain or question to come up about it before we switched to that.

Ah that makes a lot of sense, I was sure there was a reason. Thanks!