export default defineNuxtRouteMiddleware(async (to, from) => { if (to.path === '/') return navigateTo('/projects') if (to.path !== '/' && to.path.endsWith('/')) return navigateTo(to.path.slice(0, -1)) })