I am just upgrading a Rails app from Hyperloop to Hyperstack. Is the "opal_hot_reloader" gem obsolete since Hyperstack?
Asked
Active
Viewed 57 times
1 Answers
1
Yes... a version of the hot-loader is built into hyperstack now.
In your hyperstack.rb
initializer you want:
Hyperstack.configuration do |config|
...
config.import 'hyperstack/hotloader', client_only: true if Rails.env.development?
end
The Procfile (for foreman) looks like this:
web: bundle exec rails s -b 0.0.0.0
hot-loader: bundle exec hyperstack-hotloader -p 25222 -d app/hyperstack
assets/javascripts/application.js should end like this:
//= require jquery
//= require jquery_ujs
//= require hyperstack-loader
The hyperstack loader will (using the initializer) figure out what additional code to add to your assets including the hotloader.

Mitch VanDuyn
- 2,838
- 1
- 22
- 29
-
FYI if you are upgrading I would also just glance at https://github.com/hyperstack-org/hyperstack/blob/edge/install/rails-webpacker.rb to see what the standard install looks like and update your files accordingly – Mitch VanDuyn May 01 '19 at 19:40