UNPKG

generator-upendodnn

Version:

Scaffolds DNN extensions, including Modules (Webforms, SPA, and MVC), Persona Bar, Skin Object, Library, Scheduler, and Hotcakes Commerce projects (based on the generator built by Matt Rutledge).

22 lines (18 loc) 770 B
import { createRouter, createWebHistory } from 'vue-router'; import HomeItem from './components/HomeItem.vue'; import ItemDetails from './components/ItemDetails.vue'; import About from './components/AboutItem.vue'; import { resolveHomePath, resolvePath } from './assets/utils' const url = new URL(window.location.href); const basePath = url.pathname; const routes = [ { path: resolveHomePath(basePath), component: HomeItem }, { path: resolvePath(basePath, '/details'), component: ItemDetails }, { path: resolvePath(basePath, '/about'), component: About }, { path: '/:pathMatch(.*)*', redirect: resolveHomePath(basePath) } ]; const router = createRouter({ history: createWebHistory(), routes, }); export default router;