import Vue from 'vue' ; import Router , { RouterOptions , RouteConfig } from 'vue-router' ; Vue . use ( Router ) ; import TranslationView from '@/views/Translation.vue' ; const routes = [ { path : '/' , redirect : '/translate' , } , { path : '/translate' , name : 'translate' , component : TranslationView , meta : { locale : 'translate' } , } , { path : '/picked' , name : 'picked' , component : ( ) => import ( '@/views/Picked.vue' ) , meta : { locale : 'picked' } , } , { path : '/recent' , name : 'recent' , component : ( ) => import ( '@/views/Recent.vue' ) , meta : { locale : 'recent' } , } , { path : '/preference' , name : 'preference' , component : ( ) => import ( '@/views/Preference.vue' ) , meta : { locale : 'preference' } , } , { path : '/settings' , name : 'settings' , component : ( ) => import ( '@/views/Settings.vue' ) , meta : { locale : 'settings' } , } , ] ; export default new Router ( { mode : 'hash' , base : process . env . BASE_URL , routes , } as RouterOptions ) ;