S
S
Sergey Beloventsev2018-07-09 18:55:16
Yii
Sergey Beloventsev, 2018-07-09 18:55:16

How to compress activeForm.js and yii.validation.js?

Compressed as indicated here but after connecting

'assetManager' => [
            'bundles' => require(__DIR__ . '/assets-prod.php')

        ]

activeForm.js and yii.validation.js are still connected, what's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-07-09
@webinar

Shouldn't? The fact that you have connected some bundle does not mean that the rest has stopped working.
For example, if you wanted to disable jquery:

'assetManager' => [
            'yii\web\JqueryAsset' => false
]

As I understand it, the very first activeForm widget pulls its assets, and since it has no idea that you compressed something there, it connects all scripts with dependencies (jquery and boostrap, most likely, as well). Well, plus you connected all this in a compressed form.
Although I don't know what's in youassets-prod.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question