You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The last lines of `app/assets/javascripts/application.js` should look like this:
53
61
54
62
```javascript
55
63
//= require hyperstack-loader
56
-
//= require_tree .
64
+
//= require_tree .
57
65
```
58
66
59
-
Note: remove any lines mentioning hotloader.
67
+
If you are not using require_tree, then the hyperstack-loader require should be towards the bottom, you might have to play with the position to get it right, but basically it should be the last thing required before you get into your application specific requires that are in the `app/assets/javascript` directory.
68
+
69
+
remove any references to react, react_ujs, hotloader, opal, opal-jquery, and hyperloop-loader, this is all now handled by hyperstack-loader
60
70
61
71
### 6. Update items related to Hotloader
62
72
@@ -80,17 +90,85 @@ remove any other references to hotloader in the initializer, and in `app/assets
80
90
81
91
Rename `config/initializers/hyperloop.rb` to `config/initializers/hyperstack.rb`
82
92
93
+
The initializer will look like this... comment/uncomment as needed:
94
+
95
+
```ruby
96
+
# comment next line out if NOT using webpacker
97
+
Hyperstack.cancel_import 'react/react-source-browser'# bring your own React and ReactRouter via Yarn/Webpacker
98
+
# uncomment next line if using hotloader
99
+
# Hyperstack.import 'hyperstack/hotloader', client_only: true if Rails.env.development?
100
+
# set the component base class
101
+
102
+
Hyperstack.component_base_class ='HyperComponent'# i.e. 'ApplicationComponent'
103
+
104
+
# prerendering is default :off, you should wait until your
105
+
# application is relatively well debugged before turning on.
106
+
107
+
Hyperstack.prerendering =:off# or :on
108
+
109
+
# transport controls how push (websocket) communications are
110
+
# implemented. The default is :action_cable.
111
+
# Other possibilities are :pusher (see www.pusher.com) or
112
+
# :simple_poller which is sometimes handy during system debug.
113
+
114
+
Hyperstack.transport =:action_cable# or :none, :pusher, :simple_poller
0 commit comments