Skip to content

Commit

Permalink
Only add assets to precompile list for Sprockets
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Oct 9, 2024
1 parent ad32dac commit aaf47c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ahoy/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def call_with_quiet_ahoy(env)

# for importmap
initializer "ahoy.importmap" do |app|
if defined?(Importmap)
if defined?(Importmap) && defined?(Sprockets)
app.config.assets.precompile << "ahoy.js"
end
end
Expand Down

0 comments on commit aaf47c0

Please sign in to comment.