Skip to content

Commit

Permalink
Fix webpacker compatibility
Browse files Browse the repository at this point in the history
require 'webpacker/version' so that `Webpacker::VERSION` is accessible.
And for consitency, require 'skakapacker/version' when using Shakapacker
  • Loading branch information
rioug committed Jan 24, 2024
1 parent 9221f6d commit 0fb0f7a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/wicked_pdf/wicked_pdf_helper/assets.rb
Expand Up @@ -232,8 +232,10 @@ def running_in_development?

def webpacker_version
if defined?(Shakapacker)
require 'skakapacker/version'
Shakapacker::VERSION
elsif defined?(Webpacker)
require 'webpacker/version'
Webpacker::VERSION
end
end
Expand Down

0 comments on commit 0fb0f7a

Please sign in to comment.