-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
Not sure if anyone has had this issue before or I have misconfigured something badly but as far as I can tell xray-rails will not work when using jQuery from Webpacker due it scanning your html for a jQuery script tag in your
Gem versions I am using:
Rails: v5.2.3
Sprockets: v3.7.2
Xray: 0.3.2
Offending line:
# middleware.rb
if append_js!(body, 'jquery', 'xray')
inject_xray_bar!(body)
end
Workaround:
Create an empty jquery.js somewhere so that it is included in your application.js manifest file which allows X-ray to append itself. Make sure that your Webpack bundle that includes jQuery is loaded before your sprockets application.js. E.g.
<%= javascript_pack_tag 'application' %>
<%= javascript_include_tag 'application' %>
Metadata
Metadata
Assignees
Labels
No labels