import { createLogGuard, createProgressGuard } from '@yanhao98/vue-router-helper'; import type { Router } from 'vue-router'; import { createStackGuard } from './stack-guard'; // Don't change the order of creation export function setupRouterGuard(router: Router) { createProgressGuard(router); createLogGuard(router); createStackGuard(router); router.onError((error) => { console.debug('🚨 [router error]: ', error); }); }