Skip to content

Commit 437d172

Browse files
author
suterma
committed
updated tsconfig module handling
1 parent 63be2ef commit 437d172

File tree

2 files changed

+16
-33
lines changed

2 files changed

+16
-33
lines changed

src/router/index.ts

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router';
22
import 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';
38
import { useTitle } from '@vueuse/core';
49
import { store } from '@/store/store';
510
import { 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+
*/
916
const 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 */
8669
const title = computed(() => {
8770
let compilationInfo = '';
8871
const compilationTitle = store.getters.compilation.Title;

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"target": "es2015",
55
// downlevelIteration provides iteration support for es5 and below
66
"downlevelIteration": true,
7-
"module": "commonjs",
7+
"module": "ES6" /*ES6 is a.k.a ES2015*/,
88
"strict": true,
99
"declaration": true,
1010
"jsx": "preserve",

0 commit comments

Comments
 (0)