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
{{ message }}
This repository was archived by the owner on Oct 19, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 19, 2018. It is now read-only.
# config/environments/development.rb
MyApp::Application.configure do
config.react.variant = :development
end
# config/environments/production.rb
MyApp::Application.configure do
config.react.variant = :production
end
With ActionCable
cable.js must be loaded before hyperloop-loader!
JQuery support
Hyperloop offers some support code for integrating opal-jquery. To activate this code, opal jquery must be required on the client side before hyperloop-loader or hyper-component, example for using app/assets/application.rb: <- .rb
Activity
mpantel commentedon Aug 22, 2018
Getting React with Sprockets:
setting config.react.variant to :production or :development explicitly is not necessary because that is the default behaviour for react-rails: https://github.com/reactjs/react-rails/blob/ec7124148bb82023a111ee801f3d4b52a7bab4bb/lib/react/rails/railtie.rb#L8
mpantel commentedon Aug 28, 2018
When on webpacker, lap28 edge:
i had to set:
config.assets.compile = true in config/environments/production.rb
no need for:
<%= javascript_pack_tag "client_only" %>
<%= javascript_pack_tag "client_and_server" %>
in app/views/layout/application.html.erb
also no need for:
config/webpack/custom.js
i think that many of those are now handled from hyperloop/config and autoconfig
i can also deploy with capistrano and get react production variant!