A
A
atis //2016-11-30 21:20:04
Yii
atis //, 2016-11-30 21:20:04

How to disable jquery connection in asset Yii2?

I create an asset.
The most common.

class MainAsset extends AssetBundle
{
    public $css = [ 
        '/css/main.css' 
    ];
    public $js = [
        '/js/main.js'
    ];
}

For some reason, after all my scripts, jquery.js is always connected from the /web/assets/ folder.
Help please, otherwise this piece of g called Yii2 specifically got me ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2016-11-30
@atis2345

Good evening.
In the config file, add the "components" section

'assetManager' => [
    'bundles' => [
        'yii\web\JqueryAsset' => [
            'js'=>[]
        ],
        'yii\bootstrap\BootstrapPluginAsset' => [
            'js'=>[]
        ],
        'yii\bootstrap\BootstrapAsset' => [
            'css' => [],
        ],
    ],
],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question