hotwired / stimulus-rails

Use Stimulus in your Ruby on Rails app
https://stimulus.hotwired.dev
MIT License
638 stars 92 forks source link

Is it possible to use controllers stored in a GEM ? #122

Closed troptropcontent closed 1 year ago

troptropcontent commented 1 year ago

Hello ✋

I have a Gem (and engine, generated through rails new plugin ...) and a rails 7 application using importmap

The gem holds stimulus controllers that i want to be available in the host application.

Is this possible ? 🤔

I try things like like this in the importmap

pin_all_from "uistiti/app/assets/javascript/controllers", under: "uistiti_controllers"

But it does not seems to work :(

Thank you so much for your help 🙏