samdark / yii2-cookbook

Yii 2.0 Community Cookbook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Debug Toolbar and Asset processing with Grunt

opened this issue · comments

In "Asset processing with Grunt", you suggest turning off Yii asset management completely by doing the following:

'bundles' => false,

In my experience, that is not the best method because, in addition to turning off the asset management for all the assets you are adding via Grunt, it also causes Yii not to load the debug toolbar assets. So instead of setting bundles to false across the board, I do the following:

'bundles' => [
    'yii\web\JqueryAsset' => false,
    'yii\bootstrap\BootstrapAsset' => false,
    'yii\web\YiiAsset' => false,
    'yii\validators\ValidationAsset' => false,
    'yii\widgets\ActiveFormAsset' => false
],

That way, yii\debug\ToolbarAsset will still load and the debug toolbar will be visible and functional.