I am using PHP to concat’ several JS and CSS files.
The CSS is fine. The JS however breaks, but only some of the files break. I then stop these from being added and they then work again as individual files.
Is there a way I can safely wrap each files contents to ensure it will not break? And act “alone” to to speak?
I have tried some libraries to do this but haven’t found anything reliable enough yet, hence the home brew.
Thanks
Jake
Maybe you can try wrapping the .js files into a function closure using php? i.e.
I’m not sure if there will be unpredicted issues or not with your particular files, but you can try