diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-30 18:09:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-30 18:09:46 +0300 |
commit | dd240e5cc4e0abc4eef8b97962c247dab43e3777 (patch) | |
tree | bc0752959bc0713afb555e358bb43d65cf04f48e /app/assets/javascripts/snippets | |
parent | 6aa5c04c74d2d70ee7d19ef3a155b2def9dd46de (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/snippets')
-rw-r--r-- | app/assets/javascripts/snippets/index.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/app/assets/javascripts/snippets/index.js b/app/assets/javascripts/snippets/index.js index 16635a081a2..d3caec42ce7 100644 --- a/app/assets/javascripts/snippets/index.js +++ b/app/assets/javascripts/snippets/index.js @@ -3,8 +3,6 @@ import VueApollo from 'vue-apollo'; import Translate from '~/vue_shared/translate'; import createDefaultClient from '~/lib/graphql'; -import SnippetsShow from './components/show.vue'; -import SnippetsEdit from './components/edit.vue'; import { SNIPPET_LEVELS_MAP, SNIPPET_VISIBILITY_PRIVATE } from '~/snippets/constants'; Vue.use(VueApollo); @@ -48,9 +46,17 @@ function appFactory(el, Component) { } export const SnippetShowInit = () => { - appFactory(document.getElementById('js-snippet-view'), SnippetsShow); + import('./components/show.vue') + .then(({ default: SnippetsShow }) => { + appFactory(document.getElementById('js-snippet-view'), SnippetsShow); + }) + .catch(() => {}); }; export const SnippetEditInit = () => { - appFactory(document.getElementById('js-snippet-edit'), SnippetsEdit); + import('./components/edit.vue') + .then(({ default: SnippetsEdit }) => { + appFactory(document.getElementById('js-snippet-edit'), SnippetsEdit); + }) + .catch(() => {}); }; |