diff options
-rw-r--r-- | app/assets/javascripts/katex/katex_bundle.js | 3 | ||||
-rw-r--r-- | config/application.rb | 1 | ||||
-rw-r--r-- | config/webpack.config.js | 1 | ||||
-rw-r--r-- | lib/gitlab/gon_helper.rb | 2 |
4 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/katex/katex_bundle.js b/app/assets/javascripts/katex/katex_bundle.js new file mode 100644 index 00000000000..deafc90ce9b --- /dev/null +++ b/app/assets/javascripts/katex/katex_bundle.js @@ -0,0 +1,3 @@ +import katex from 'vendor/katex'; + +window.katex = katex; diff --git a/config/application.rb b/config/application.rb index cdb93e50e66..749153c0cdb 100644 --- a/config/application.rb +++ b/config/application.rb @@ -97,7 +97,6 @@ module Gitlab config.assets.precompile << "notify.css" config.assets.precompile << "mailers/*.css" config.assets.precompile << "katex.css" - config.assets.precompile << "katex.js" config.assets.precompile << "xterm/xterm.css" config.assets.precompile << "lib/ace.js" config.assets.precompile << "u2f.js" diff --git a/config/webpack.config.js b/config/webpack.config.js index 7298e7109c6..f5af0632b79 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -33,6 +33,7 @@ var config = { graphs: './graphs/graphs_bundle.js', groups_list: './groups_list.js', issuable: './issuable/issuable_bundle.js', + katex: './katex/katex_bundle.js', merge_conflicts: './merge_conflicts/merge_conflicts_bundle.js', merge_request_widget: './merge_request_widget/ci_bundle.js', network: './network/network_bundle.js', diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb index 6c275a8d5de..0f6ce108908 100644 --- a/lib/gitlab/gon_helper.rb +++ b/lib/gitlab/gon_helper.rb @@ -9,7 +9,7 @@ module Gitlab gon.shortcuts_path = help_page_path('shortcuts') gon.user_color_scheme = Gitlab::ColorSchemes.for_user(current_user).css_class gon.katex_css_url = ActionController::Base.helpers.asset_path('katex.css') - gon.katex_js_url = ActionController::Base.helpers.asset_path('katex.js') + gon.katex_js_url = ActionController::Base.helpers.webpack_asset_paths('katex').first if current_user gon.current_user_id = current_user.id |