Remove mr_notes webpack bundle

This commit is contained in:
Mike Greiling 2018-03-02 21:16:11 +00:00 committed by Fatih Acet
parent 369d34c7c8
commit b342d2ae52
4 changed files with 8 additions and 10 deletions

View file

@ -3,7 +3,7 @@ import notesApp from '../notes/components/notes_app.vue';
import discussionCounter from '../notes/components/discussion_counter.vue';
import store from '../notes/stores';
document.addEventListener('DOMContentLoaded', () => {
export default function initMrNotes() {
new Vue({ // eslint-disable-line
el: '#js-vue-mr-discussions',
components: {
@ -38,4 +38,4 @@ document.addEventListener('DOMContentLoaded', () => {
return createElement('discussion-counter');
},
});
});
}

View file

@ -1,7 +1,13 @@
import { hasVueMRDiscussionsCookie } from '~/lib/utils/common_utils';
import initMrNotes from '~/mr_notes';
import initSidebarBundle from '~/sidebar/sidebar_bundle';
import initShow from '../init_merge_request_show';
document.addEventListener('DOMContentLoaded', () => {
initShow();
initSidebarBundle();
if (hasVueMRDiscussionsCookie()) {
initMrNotes();
}
});

View file

@ -5,11 +5,6 @@
- page_title "#{@merge_request.title} (#{@merge_request.to_reference})", "Merge Requests"
- page_description @merge_request.description
- page_card_attributes @merge_request.card_attributes
- content_for :page_specific_javascripts do
= webpack_bundle_tag('common_vue')
- if has_vue_discussions_cookie?
= webpack_bundle_tag('mr_notes')
.merge-request{ data: { mr_action: j(params[:tab].presence || 'show'), url: merge_request_path(@merge_request, format: :json), project_path: project_path(@merge_request.project) } }
= render "projects/merge_requests/mr_title"

View file

@ -43,9 +43,6 @@ function generateEntries() {
autoEntriesCount = Object.keys(autoEntries).length;
const manualEntries = {
monitoring: './monitoring/monitoring_bundle.js',
mr_notes: './mr_notes/index.js',
common: './commons/index.js',
common_vue: './vue_shared/vue_resource_interceptor.js',
locale: './locale/index.js',