function beforeEnter (to, from, next) { // do things next() } export default { beforeRouteEnter (to, from, next) { beforeEnter(to, from, next) }, beforeRouteUpdate (to, from, next) { beforeEnter(to, from, next) } }