diff --git a/public/apple-touch-icon.png.png b/public/apple-touch-icon.png.png new file mode 100644 index 0000000..648567d Binary files /dev/null and b/public/apple-touch-icon.png.png differ diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..7eae4e4 Binary files /dev/null and b/public/favicon.ico differ diff --git a/src/App.vue b/src/App.vue index a06181f..eac652c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/src/main.js b/src/main.js index 0ab8880..cada3c0 100644 --- a/src/main.js +++ b/src/main.js @@ -1,22 +1,6 @@ import { createApp } from "vue"; -import { createRouter, createWebHashHistory } from "vue-router"; - import "./style.css"; import App from "./App.vue"; -import Home from "./views/Home.vue"; -import About from "./views/About.vue"; -import ReferenceID from "./ReferenceID.vue"; - -const routes = [ - { path: "/", component: Home }, - { path: "/about", component: About }, - { path: "/referenceId/", component: ReferenceID }, -]; - -const router = createRouter({ - // 4. Provide the history implementation to use. We are using the hash history for simplicity here. - history: createWebHashHistory(), - routes, // short for `routes: routes` -}); +import router from "./router"; createApp(App).use(router).mount("#app"); diff --git a/src/router/index.js b/src/router/index.js new file mode 100644 index 0000000..e61288e --- /dev/null +++ b/src/router/index.js @@ -0,0 +1,28 @@ +import { createRouter, createWebHistory } from "vue-router"; +import Home from "../views/Home.vue"; +import ReferenceID from "../views/ReferenceID.vue"; + +const routes = [ + { + 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"), + }, + { path: "/referenceId", name: "referenceId", component: ReferenceID }, +]; + +const router = createRouter({ + history: createWebHistory(), + routes, +}); + +export default router; diff --git a/src/views/Home.vue b/src/views/Home.vue index f64dc4f..e75b488 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -1,5 +1,12 @@ \ No newline at end of file diff --git a/src/ReferenceID.vue b/src/views/ReferenceID.vue similarity index 89% rename from src/ReferenceID.vue rename to src/views/ReferenceID.vue index 25ffa43..356fc40 100644 --- a/src/ReferenceID.vue +++ b/src/views/ReferenceID.vue @@ -1,9 +1,9 @@