wevisdemo / design-systems

WeVis monorepo for design system documentation and cross-framework UI components
https://wevisdemo.github.io/design-systems/
MIT License
16 stars 2 forks source link

SvelteKit rejects `<NavBar>`'s default `homeHref` when `base` is not `'/'` #6

Closed rootEnginear closed 1 year ago

rootEnginear commented 1 year ago

SvelteKit won't be able to build if kit.paths.base is not '/'. Many projects that build in subpath such as /law-watch will fail on build.

Error: 404 / does not begin with `base`, which is configured in `paths.base` and can be imported from `$app/paths`

This problem is from the following line:

https://github.com/wevisdemo/design-systems/blob/e6992630b864167eb9fb651d421b682641387673/ui/src/components/navbar/navbar.lite.tsx#L16

The current workaround is to add homeHref="https://wevis.info/" to the <NavBar> component. I also suggest this as a solution since the home URL is https://wevis.info/ (If not or using specific subdomain, you can specify it through homeHref).

rootEnginear commented 1 year ago

Fixed in b391acb2da0ac0dfa5cf474c7d1ab998b279b5e2