summaryrefslogtreecommitdiff
path: root/iridescence/src/router/index.ts
diff options
context:
space:
mode:
authorAdam Carpenter <atc@53hor.net>2020-04-21 21:04:33 -0400
committerAdam Carpenter <atc@53hor.net>2020-04-21 21:04:33 -0400
commit6b7744a16c7bf321fb2874b54d49e3b954f618fa (patch)
tree6c705f888ed82441bf49b6ec93438b8e2acbf76a /iridescence/src/router/index.ts
downloadtheglassyladies-6b7744a16c7bf321fb2874b54d49e3b954f618fa.tar.xz
theglassyladies-6b7744a16c7bf321fb2874b54d49e3b954f618fa.zip
init
Diffstat (limited to 'iridescence/src/router/index.ts')
-rw-r--r--iridescence/src/router/index.ts30
1 files changed, 30 insertions, 0 deletions
diff --git a/iridescence/src/router/index.ts b/iridescence/src/router/index.ts
new file mode 100644
index 0000000..8716a04
--- /dev/null
+++ b/iridescence/src/router/index.ts
@@ -0,0 +1,30 @@
+import Vue from "vue";
+import VueRouter, { RouteConfig } from "vue-router";
+import Home from "../views/Home.vue";
+
+Vue.use(VueRouter);
+
+const routes: Array<RouteConfig> = [
+ {
+ path: "/",
+ name: "Home",
+ component: Home
+ },
+ {
+ path: "/about",
+ name: "About",
+ // route level code-splitting
+ // this generates a separate chunk (about.[hash].js) for this route
+ // which is lazy-loaded when the route is visited.
+ component: () =>
+ import(/* webpackChunkName: "about" */ "../views/About.vue")
+ }
+];
+
+const router = new VueRouter({
+ mode: "history",
+ base: process.env.BASE_URL,
+ routes
+});
+
+export default router;