diff --git a/app/assets/javascripts/merge_request_widget/ci_bundle.js.es6 b/app/assets/javascripts/merge_request_widget/ci_bundle.js.es6
new file mode 100644
index 0000000000000000000000000000000000000000..023975616574742d5014bb0109c108e9e443e002
--- /dev/null
+++ b/app/assets/javascripts/merge_request_widget/ci_bundle.js.es6
@@ -0,0 +1,24 @@
+$(() => {
+  /* TODO: This needs a better home, or should be refactored. It was previously contained
+   * in a script tag in app/views/projects/merge_requests/widget/open/_accept.html.haml,
+   * but Vue chokes on script tags and prevents their execution. So it was moved here
+   * temporarily.
+   * */
+
+  $('.accept-mr-form').on('ajax:send', () => {
+    $('.accept-mr-form :input').disable();
+  });
+
+  $('.accept_merge_request').on('click', () => {
+    $('.js-merge-button').html('<i class="fa fa-spinner fa-spin"></i> Merge in progress');
+  });
+
+  $('.merge_when_build_succeeds').on('click', () => {
+    $('#merge_when_build_succeeds').val('1');
+  });
+
+  $('.js-merge-dropdown a').on('click', (e) => {
+    e.preventDefault();
+    $(this).closest('form').submit();
+  });
+});
diff --git a/app/views/projects/merge_requests/widget/open/_accept.html.haml b/app/views/projects/merge_requests/widget/open/_accept.html.haml
index d6f7f23533cefb020ad2a45ea67b3e8f13397279..7809e9c8c72fa318f5e935d6e86bc1d8f0be8d51 100644
--- a/app/views/projects/merge_requests/widget/open/_accept.html.haml
+++ b/app/views/projects/merge_requests/widget/open/_accept.html.haml
@@ -1,3 +1,6 @@
+- content_for :page_specific_javascripts do
+  = page_specific_javascript_tag('merge_request_widget/ci_bundle.js')
+
 - status_class = @pipeline ? " ci-#{@pipeline.status}" : nil
 
 = form_for [:merge, @project.namespace.becomes(Namespace), @project, @merge_request], remote: true, method: :post, html: { class: 'accept-mr-form js-quick-submit js-requires-input' } do |f|
@@ -47,21 +50,3 @@
           rows: 14, hint: true
 
     = hidden_field_tag :merge_when_build_succeeds, "", autocomplete: "off"
-
-  :javascript
-    $('.accept-mr-form').on('ajax:send', function() {
-      $(".accept-mr-form :input").disable();
-    });
-
-    $('.accept_merge_request').on('click', function() {
-      $('.js-merge-button').html("<i class='fa fa-spinner fa-spin'></i> Merge in progress");
-    });
-
-    $('.merge_when_build_succeeds').on('click', function() {
-      $("#merge_when_build_succeeds").val("1");
-    });
-
-    $('.js-merge-dropdown a').on('click', function(e) {
-      e.preventDefault();
-      $(this).closest("form").submit();
-    });
diff --git a/config/application.rb b/config/application.rb
index 057d60ca869ec15d7ee42abd379573e5085d2e4e..7c7b858c6078f3a38046d81e86124c3f35112bcb 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -96,6 +96,9 @@ module Gitlab
     config.assets.precompile << "profile/profile_bundle.js"
     config.assets.precompile << "protected_branches/protected_branches_bundle.js"
     config.assets.precompile << "diff_notes/diff_notes_bundle.js"
+    config.assets.precompile << "lib/vue_resource.js"
+    config.assets.precompile << "merge_request_widget/ci_bundle.js"
+    config.assets.precompile << "issuable/issuable_bundle.js"
     config.assets.precompile << "boards/boards_bundle.js"
     config.assets.precompile << "cycle_analytics/cycle_analytics_bundle.js"
     config.assets.precompile << "merge_conflicts/merge_conflicts_bundle.js"