blob: 5cd386007794f142bc718ff1a6f360c75cfd551e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import createDefaultClient from '~/lib/graphql';
import WorkItemsListApp from './components/work_items_list_app.vue';
export const mountWorkItemsListApp = () => {
const el = document.querySelector('.js-work-items-list-root');
if (!el) {
return null;
}
Vue.use(VueApollo);
return new Vue({
el,
name: 'WorkItemsListRoot',
apolloProvider: new VueApollo({
defaultClient: createDefaultClient(),
}),
provide: {
fullPath: el.dataset.fullPath,
},
render: (createComponent) => createComponent(WorkItemsListApp),
});
};
|