Closed
Description
Steps to reproduce
- Add a custom
react.js
file and/orJSXTransformer.js
into your project's asset pipeline. - Observe the custom react version is not loaded.
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-L23
It could also be I am misunderstanding the feature since it should work currently if I drop in custom files into the gem's directories.