After long search in Google and on several Github repositories, I couldn't find anything solid (I found for HTML, not for JS)
The minifiers I use for JS files mess with my PHP code, for example, if I have the file example.js.php
<?php header("Content-Type: application/javascript");
$var1 = $_GET['f'];
?>
//some JS and PHP code
For example, the JS minifiers I use, convert $_GET['f']
to $_GET.f
; which is OK for a JS object, but not for PHP.
Any ideas on how to compact the JS code leaving the PHP intact?