Home absolute path
sysmat opened this issue · 4 comments
sysmat commented
When navigating by name to HOME link should be relative not absolute
{
path: "/",
name: "HOME",
component: Todos
},
...
<RouterLink to={{ name: 'HOME' }}>Home</RouterLink>
When using web application server to serve svelte app there is problem(http://localhost:8080/svelte/):
- no rote can be found so Todos is not showen
- when navigation by RouterLink Home then url is http://localhost:8080/
``
davidhorak commented
@sysmat you can change the router base URL via router options:
https://github.com/spaceavocado/svelte-router#router-options (basename) example usage could be found the boilerplate template https://github.com/spaceavocado/svelte-router-template/blob/4ac2749ecb9dfd9a72f94a4554b24c8c85710825/webpack.config.js#L18
sysmat commented
It would be great if template have support for the latest sass-loader VER 8
davidhorak commented
@sysmat the template has been updated https://github.com/spaceavocado/svelte-router-template, it now uses the sass-loader v8, besides other updates