By the way is there a reasone why you use echo '<script src="... instead return '<script src=".. ?
This function is called to generate output. I see no advantage in returning the data and have the user do the "echo" command. It will be just a little harder to explain
Also, I noticed that it compresses all possible modules and snippets and not just the ones in use like register_frontend_m odfiles('css/js');
register_frontend_modfiles will generate the css/js for all installed snippets. They are loaded always and there is no telling when and if they will be used.
For modules it is normally based on what pagemodules are used on the current page.
In our case all snippet frontend css.js is generated as usual but also for all installed modules
in the website.
If that was not done the minified.css/js would only work on the page where it was generated. It would not have the frontend stuff for the next page.
If minify includes any frontend files for modules that are not used in the website, just uninstall these modules! They are not used anyway.
If that is the case there is a "hidden" feature...
will skip adding the frontend stuff.
It will just combine/compress the listed files.
Using this option will generate less efficient css/js but it will be more fail-safe.