Does this gem depend on all of Rails? As far as I can tell it only uses railties. I know it does depend on webpacker OR importmap also.
Our app skips importing significant parts of rails for efficiency because we don't use them, namely
activestorage
actioncable
actionmailbox
actiontext
and I believe this is not an uncommon practice. requestjs-rails would be our only dependency requiring all of rails.
An alternative is to just hand-code what this gem does in our js requests. But if the Gemfile/gemspec can be rewritten to only require railties or any other gems that requestjs-rails depends on, i'd be happy to submit a PR.