Sha256: edf5f8449fa9d3bc794779257ba7ef61ed619326984a977e517935b6094bbad3
Contents?: true
Size: 639 Bytes
Versions: 1
Compression:
Stored size: 639 Bytes
Contents
module React module Rails class Engine < ::Rails::Engine initializer "react_rails.setup_engine", :group => :all do |app| sprockets_env = app.assets || Sprockets # Sprockets 3.x expects this in a different place if Gem::Version.new(Sprockets::VERSION) >= Gem::Version.new("3.0.0") sprockets_env.register_mime_type("application/jsx", extensions: [".jsx", ".js.jsx"]) sprockets_env.register_transformer("application/jsx", "application/javascript", React::JSX::Processor) else sprockets_env.register_engine(".jsx", React::JSX::Template) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
react-rails-1.4.2 | lib/react/rails/engine.rb |