2022-07-16 23:28:13 +05:30
|
|
|
import { GlToast } from '@gitlab/ui';
|
2021-12-11 22:18:48 +05:30
|
|
|
import Vue from 'vue';
|
|
|
|
import VueRouter from 'vue-router';
|
|
|
|
import { joinPaths } from '~/lib/utils/url_utility';
|
|
|
|
import { routes } from './routes';
|
|
|
|
|
2022-07-16 23:28:13 +05:30
|
|
|
Vue.use(GlToast);
|
2021-12-11 22:18:48 +05:30
|
|
|
Vue.use(VueRouter);
|
|
|
|
|
|
|
|
export function createRouter(fullPath) {
|
|
|
|
return new VueRouter({
|
|
|
|
routes,
|
|
|
|
mode: 'history',
|
|
|
|
base: joinPaths(fullPath, '-', 'work_items'),
|
|
|
|
});
|
|
|
|
}
|