feat: setup unplugin-vue-router, fixed eslnt config, SmartLink for type-safe internal/external links

This commit is contained in:
Benjamin Singleton 2026-02-12 01:18:14 -06:00
parent 3c0e46c9ab
commit 60ce6d75f7
15 changed files with 435 additions and 311 deletions

View file

@ -0,0 +1,18 @@
<script setup lang="ts">
import type { RouterLinkProps } from "vue-router";
import type { RouteNamedMap } from "vue-router/auto-routes";
defineProps<
Omit<RouterLinkProps, "to">
& (
| { internal: true; to: keyof RouteNamedMap }
| { external: true; to: `https://${string}` | `http://${string}` }
)
>();
</script>
<template>
<RouterLink v-bind="$props">
<slot />
</RouterLink>
</template>