INNER CODE UNIT · TypeScript

basePath

opensquilla/opensquilla · opensquilla-webui/src/router/index.ts:15

const basePath = (() => {
  const el = document.getElementById('opensquilla-data')
  const raw = el?.dataset.basePath || '/control'
  return raw.endsWith('/') ? raw : raw + '/'
})()

const platform = getPlatform()
const NotFoundView = () => import('@/views/NotFoundView.vue')

export const routes: RouteRecordRaw[] = [
  ...sharedRoutes,
  ...(platform.capabilities.hasWebConfig ? webRoutes : []),
  { path: '/:pathMatch(.*)*', name: 'not-found', component: NotFoundView, meta: { title: 'Not Found', platforms: ['web', 'desktop'] } },
]

export const router = createRouter({
  history: createWebHistory(basePath),
  routes,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…