Problem With Assets In Yii2

Hello everybody.

I’m following the Definitive Guide to minify and compress js and css files. I’m using th YUI Compressor.

I followed the steps, I configured the template and ran the command. The files was created. But my question is.

How can I do to use the file all-<timestamp>.css in production and all files in development??

How can I do to use the file config_assetscompressed.php ??

I put this in web.php

'assetManager' => [

            'bundles' => require __DIR__ . '/../config/assets_compressed.php',


But the file doesn’t appear in HTML code.

My regards.