2022-04-28 05:08:26 -04:00
|
|
|
import { GlToast } from '@gitlab/ui';
|
2021-10-19 08:12:07 -04:00
|
|
|
import Vue from 'vue';
|
|
|
|
import VueRouter from 'vue-router';
|
|
|
|
import { joinPaths } from '~/lib/utils/url_utility';
|
|
|
|
import { routes } from './routes';
|
|
|
|
|
2022-04-28 05:08:26 -04:00
|
|
|
Vue.use(GlToast);
|
2021-10-19 08:12:07 -04:00
|
|
|
Vue.use(VueRouter);
|
|
|
|
|
|
|
|
export function createRouter(fullPath) {
|
|
|
|
return new VueRouter({
|
|
|
|
routes,
|
|
|
|
mode: 'history',
|
|
|
|
base: joinPaths(fullPath, '-', 'work_items'),
|
|
|
|
});
|
|
|
|
}
|