diff --git a/lib/chartkick/engine.rb b/lib/chartkick/engine.rb index 33bedce..520bcc8 100644 --- a/lib/chartkick/engine.rb +++ b/lib/chartkick/engine.rb @@ -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