Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-30 18:09:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-30 18:09:46 +0300
commitdd240e5cc4e0abc4eef8b97962c247dab43e3777 (patch)
treebc0752959bc0713afb555e358bb43d65cf04f48e /app/assets/javascripts/snippets
parent6aa5c04c74d2d70ee7d19ef3a155b2def9dd46de (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/snippets')
-rw-r--r--app/assets/javascripts/snippets/index.js14
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(() => {});
};