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.
Fixes #36.
  • Loading branch information
codergeek121 committed Dec 22, 2024
1 parent 3c68fb2 commit 6dd01b8
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 @@ -18,6 +18,10 @@ class Engine < ::Rails::Engine
end
end

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

initializer "hotwire_spark.install" do |application|
Hotwire::Spark.install_into application if Hotwire::Spark.enabled?
end
Expand Down

0 comments on commit 6dd01b8

Please sign in to comment.