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 27a3e7c commit bd55370
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pghero/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ class Engine < ::Rails::Engine

initializer "pghero", group: :all do |app|
# check if Rails api mode
if app.config.respond_to?(:assets)
if defined?(Sprockets) && Sprockets::VERSION.to_i >= 4
if app.config.respond_to?(:assets) && defined?(Sprockets)
if Sprockets::VERSION.to_i >= 4
app.config.assets.precompile << "pghero/application.js"
app.config.assets.precompile << "pghero/application.css"
app.config.assets.precompile << "pghero/favicon.png"
Expand Down

0 comments on commit bd55370

Please sign in to comment.