11import { createRouter , createWebHashHistory , RouteRecordRaw } from 'vue-router' ;
22import Play from '../views/Play.vue' ;
3+ import Setlist from '../views/Setlist.vue' ;
4+ import Settings from '../views/Settings.vue' ;
5+ import About from '../views/About.vue' ;
6+ import Demo from '../views/Demo.vue' ;
7+ import Development from '../views/Development.vue' ;
38import { useTitle } from '@vueuse/core' ;
49import { store } from '@/store/store' ;
510import { computed } from 'vue' ;
611
7- //import List from '../views/List.vue';
8-
12+ /** The app routes
13+ * @devdoc route level code-splitting is not used, because it is not supported with ES6/2015
14+ * Also, the views in Replayer are rather small (especially those rarely used) and would not profit from this anyway.
15+ */
916const routes : Array < RouteRecordRaw > = [
1017 { path : '/' , redirect : { name : 'Play' } } ,
1118 {
@@ -29,51 +36,27 @@ const routes: Array<RouteRecordRaw> = [
2936 {
3037 path : '/setlist' ,
3138 name : 'Setlist' ,
32- //component: Setlist,
33-
34- // route level code-splitting
35- // this generates a separate chunk (about.[hash].js) for this route
36- // which is lazy-loaded when the route is visited.
37- component : ( ) =>
38- import ( /* webpackChunkName: "setlist" */ '../views/Setlist.vue' ) ,
39+ component : Setlist ,
3940 } ,
4041 {
4142 path : '/settings' ,
4243 name : 'Settings' ,
43- // route level code-splitting
44- // this generates a separate chunk (about.[hash].js) for this routeF
45- // which is lazy-loaded when the route is visited.
46- component : ( ) =>
47- import ( /* webpackChunkName: "settings" */ '../views/Settings.vue' ) ,
44+ component : Settings ,
4845 } ,
4946 {
5047 path : '/about' ,
5148 name : 'About' ,
52- // route level code-splitting
53- // this generates a separate chunk (about.[hash].js) for this route
54- // which is lazy-loaded when the route is visited.
55- component : ( ) =>
56- import ( /* webpackChunkName: "about" */ '../views/About.vue' ) ,
49+ component : About ,
5750 } ,
5851 {
5952 path : '/demo' ,
6053 name : 'Demo' ,
61- // route level code-splitting
62- // this generates a separate chunk (about.[hash].js) for this route
63- // which is lazy-loaded when the route is visited.
64- component : ( ) =>
65- import ( /* webpackChunkName: "demo" */ '../views/Demo.vue' ) ,
54+ component : Demo ,
6655 } ,
6756 {
6857 path : '/development' ,
6958 name : 'Development' ,
70- // route level code-splitting
71- // this generates a separate chunk (about.[hash].js) for this route
72- // which is lazy-loaded when the route is visited.
73- component : ( ) =>
74- import (
75- /* webpackChunkName: "development" */ '../views/Development.vue'
76- ) ,
59+ component : Development ,
7760 } ,
7861] ;
7962
@@ -82,7 +65,7 @@ const router = createRouter({
8265 routes,
8366} ) ;
8467
85- /** Use the current route and complilation as the title for the document */
68+ /** Use the current route and compilation as the title for the document */
8669const title = computed ( ( ) => {
8770 let compilationInfo = '' ;
8871 const compilationTitle = store . getters . compilation . Title ;
0 commit comments