I think that publishing them as an NPM project would be more appropriate for Rails apps with webpacker. https://www.driftingruby.com/episodes/creating-and-publishing-a-stimulus-controller-library. You could also do it with a gem similar to how Hotwire does it with its helpers and module types.