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 4a328e5 commit 0f32158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/chartkick/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Engine < ::Rails::Engine

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

0 comments on commit 0f32158

Please sign in to comment.