I’ve been working on a project for quite some times now. I’m almost ready to go in production but before I would like to minified my css and js. I’ve already passed way too much time for something I thought would be easy. I’ve read sections “Combining and Compressing Assets” and “Using the asset Command” in the Assets page of the guide.
To understand how the yii asset command works I’m trying to combine and compress only the yii\web\YiiAsset bundle:
'bundles' => [ 'yii\web\YiiAsset', ],
It runs but the js output file is empty and the google tool closure compiler shows a lot of parse errors:
Since YiiAsset depends on JqueryAsset it also tries to compress jquery. I think these errors are the cause of the empty output js file.
So I have two questions:
[*]How to make it works with jquery?
[*]Can I use jquery.min.js instead of trying to compress jquery.js? If so how do I configure asset command to skip JqueryAsset?
I’m using the advanced template and I’m new to closure compiler.