Hi,
i'm trying to find a way to minify all the JS for my site into one file. I've been using 3rd party tools to do this but I'd like to do this within Contao if possible.
Contao already loads a minifyed script into the head:
Code:
<script src="assets/js/d7d683978e49.js"></script>
Is it possible to add my custom scripts to this? I want to get to the point where only one js file is being loaded.
I've tried loading the files through my localconfig.php using this:
Code:
$GLOBALS['TL_JAVASCRIPT'][] = 'custom-assets/js/custom.js';
Contao just outputs this into the head as a standalone script, rather than adding it to the minifyed version. It would be much better if Contao could output everything in the $GLOBALS['TL_JAVASCRIPT'] into one minifyed script. Is there a way to do this?
Thanks
Bookmarks