I couldn't find a guide that explains how to configure a #rubygem so you can #importmap JS files into your #rails app, when the JS is in a gem.
So I wrote a blogpost on it!
https://www.eirvandelden.com/developing/2024/02/13/importmap-js-from-a-gem.html
Credit goes to Alex on Stack overflow https://stackoverflow.com/users/207090/alex
If anyone knows who he is on, please mention him, because I could not have figured this out without his awesome and very complete answers!