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
Opening up dev console and running React.version now shows 16.4.2
Maybe the server_rendering is being badly behaved. If you're not using SSR then Sprockets does let you swap out the react version at will. Still a bug but less severe.
Going off of @BookOfGreg's findings, I was able to get it working by dropping in react-server.js alongside the react.js from this repo. Perhaps the documentation can be updated to reflect this.
Steps to reproduce
react.js
file and/orJSXTransformer.js
into your project's asset pipeline.Expected behavior
According to the docs the custom files should be loaded:
https://github.com/reactjs/react-rails/blob/master/VERSIONS.md#drop-in-version
Actual behavior
Files are not loaded.
System configuration
Sprockets or Webpacker version: Sprockets
React-Rails version: 2.5.0
Rect_UJS version: default
Rails version: 5.1
Ruby version: 2.3.3
Looking at Railtie, it seems like we read the paths from the AssetVariant class https://github.com/reactjs/react-rails/blob/master/lib/react/rails/railtie.rb#L92-L93 but the
AssetVariant
only looks at files in the gem root: https://github.com/reactjs/react-rails/blob/master/lib/react/rails/asset_variant.rb#L22-L23It could also be I am misunderstanding the feature since it should work currently if I drop in custom files into the gem's directories.
The text was updated successfully, but these errors were encountered: