I maintain a Rails 6 app with *.html.slim views containing legacy
I am trying to figure out how to replace this legacy JS/Coffeescript with modern ES6 while if possible continuing to declare it where it is right now, inside the *.html.slim views, in order to keep things together. But that code should still get transpiled to be compatible with all browsers. Is it possible? Is this a recommended approach or not?