Skip to content

Drop in react version not loaded from asset pipeline #993

Closed
@hphu3

Description

@hphu3

Steps to reproduce

  1. Add a custom react.js file and/or JSXTransformer.js into your project's asset pipeline.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions