const routes = [ { path: "/", component: () => import("layouts/Container.vue"), children: [ { path: "", component: () => import("layouts/MyLayout.vue"), children: [ { path: "", component: () => import("pages/Index.vue") }, { path: "login", component: () => import("pages/Login.vue") }, { path: "signup", component: () => import("pages/SignUp.vue") }, { path: "account", component: () => import("layouts/UserLayout.vue"), children: [ { path: "", component: () => import("pages/UserDashboard") }, { path: "edit", component: () => import("pages/UserSettings.vue") }, { path: "projects", component: () => import("pages/UserProjects.vue") }, { path: "collections", component: () => import("pages/UserCollections.vue") }, { path: "collections/new", component: () => import("pages/CollectionUpload.vue") }, { path: "bookmarks", component: () => import("pages/UserBookmarks.vue") }, { path: "projects/new", component: () => import("pages/ProjectUpload.vue") } ] }, { path: "collections", component: () => import("pages/Collections.vue") } ] }, { path: "search", component: () => import("layouts/SearchLayout.vue"), children: [ { path: "", component: () => import("pages/SearchResults.vue") } ] } ] } ]; // Always leave this as last one if (process.env.MODE !== "ssr") { routes.push({ path: "*", component: () => import("pages/Error404.vue") }); } export default routes;