export default defineNuxtPlugin((nuxtApp) => { const router = useRouter() const route = useRoute() // EmpĂȘcher la redirection vers la racine router.beforeEach((to, from, next) => { const basePath = '/containers/matheothierry-portfolio_nuxt' // Si l'URL ne commence pas par le bon chemin, rediriger vers le bon chemin if (!to.fullPath.startsWith(basePath)) { next(basePath + to.fullPath) return } next() }) })