S
S
Sergey Zhukov2015-10-20 20:24:33
JavaScript
Sergey Zhukov, 2015-10-20 20:24:33

How to disable AssetConverter in Yii2?

Lord!
Gave a mile away with a LESS file, connected the library itself and this file.
In the layout, everything works fine, Yii2 for some reason is struggling to convert it somewhere. Isn't that what Less.js is supposed to do on the fly?
How to turn it off? ;( Work does not work further.
ps Google searched all over, everyone wants to convert it for some reason.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
matperez, 2015-10-20
@Adobe

It seems to me that something like this should turn off:

'components' => [
        'assetManager' => [
            'converter' => [
                'class' => 'yii\web\AssetConverter',
                'commands' => [
                    'less' => false,
                ],
            ],
        ],
    ],

IMHO, it's better to put lessc, and not disable everything tightly. In production, it's definitely worth converting once on the server and giving the finished css.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question