diff --git a/lib/react_on_rails/packer_utils.rb b/lib/react_on_rails/packer_utils.rb index bd217942d..20b0cfeec 100644 --- a/lib/react_on_rails/packer_utils.rb +++ b/lib/react_on_rails/packer_utils.rb @@ -7,18 +7,18 @@ def self.using_packer? end def self.using_shakapacker_const? - return @using_shakapacker if defined?(@using_shakapacker) + return @using_shakapacker_const if defined?(@using_shakapacker_const) - @using_shakapacker = ReactOnRails::Utils.gem_available?("shakapacker") && - shakapacker_version_requirement_met?([7, 0, 0]) + @using_shakapacker_const = ReactOnRails::Utils.gem_available?("shakapacker") && + shakapacker_version_requirement_met?([7, 0, 0]) end def self.using_webpacker_const? - return @using_webpacker if defined?(@using_webpacker) + return @using_webpacker_const if defined?(@using_webpacker_const) - @using_webpacker = (ReactOnRails::Utils.gem_available?("shakapacker") && + @using_webpacker_const = (ReactOnRails::Utils.gem_available?("shakapacker") && shakapacker_version_as_array[0] <= 6) || - ReactOnRails::Utils.gem_available?("webpacker") + ReactOnRails::Utils.gem_available?("webpacker") end def self.packer_type