In a new Rails project I want to include some downloaded library js files that are already minified and usually only via script tag included in a web project. They are NOT modules.
I tried to use the importmap feature in Rails 7, but it destroys the library, making it unrunnable and throwing exceptions, because it is not a module. Is there a way to include in importmap the JS files of (minified) libraries that are without module system and do not wrap or modify them in any way?
My only way to get it working, was to put the JS file in public/js/library.js and add another script tag in the application layout.
But I expect that there is a easy standard way that includes my third party JS in some specified directory automatically NOT as modules and i need not to put each into public and source it inside my application layout. Furthermore a option to put them into one single file (and even minify it afterwards), would be the cherry on the cake.