Hi there! I'm currently migrating an old site from a now-broken-and-unsupported CMS to Astro. It's going great so far, but I'm now trying to migrate the JS, and I've hit an issue.
The site is currently still using a lot of "old-style" JS - like a global jQuery, Backbone, even modernizr.js, etc. And for now, I don't really have the time to change that, so I need to make that work. So, what's the best way to have Astro combine multiple JS files into one by simply appending it, and minifying the files, but not wrapping it in any separation/bundling logic?
If I just add script tags, then obviously the application complains, because blog.js for example can't find the global Backbone object. I also can't also create a new js file and use import to import the old JS - modernizr for example relies on this.document be defined... :/
I could probably try to find all the dependencies in their right, old, versions from NPM to have them bundler-compatible, but urgh