Skip to content

Commit

Permalink
Add basic sprockets support
Browse files Browse the repository at this point in the history
Add hotwire_spark.js to the precompiled assets. This adds Sprockets support for Rails 8 applications.
  • Loading branch information
codergeek121 committed Dec 22, 2024
1 parent 3c68fb2 commit 6b56567
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/hotwire/spark/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ class Engine < ::Rails::Engine
initializer "hotwire_spark.install" do |application|
Hotwire::Spark.install_into application if Hotwire::Spark.enabled?
end

initializer "hotwire_spark.assets" do |application|
application.config.assets.precompile << "hotwire_spark.js"
end
end
end

0 comments on commit 6b56567

Please sign in to comment.