Elderjs / ts-template

MIT License
0 stars 1 forks source link

Build output doesn't work locally by default (href <link> are absolute) #5

Closed Stijn-B closed 2 years ago

Stijn-B commented 2 years ago

The href attribute of <link> tags is an absolute url like href=/path/to/file. As a result those files aren't loaded when opening the build result (public/index.html) locally during development. This is fixed by making the urls relative like href=./path/to/file.

I don't know if making the urls relative during building would lead to unwanted effects in production. If not, it might be a nice quality of life improvent; you can check locally whether your build output behaves as expected. (Personally, when opening the build output, at first I thought I did something wrong because the css styling didn't load but it was just this detail)

Stijn-B commented 2 years ago

Is probably more related to elderjs than this template specifically so I moved the issue there: https://github.com/Elderjs/elderjs/issues/248#issue-1318765156