@justin Thank you for replying. I am using the gem in a rails engine. We had to do some adjustments so as to make the react components accessible by the rails app in the first place.

in the engine's assets.rb:

We changed this line Rails.application.config.assets.paths << Rails.root.join('app', 'assets', 'webpack') to Rails.application.config.assets.paths << InfluenshopFrontend::Engine.root.join("app", "assets", "javascripts") because we pushed the bundled JS file to the JavaScript folder.