CSS to asset folder

I have my site.css in my web/css/

which i declared here

namespace frontend\assets;
use yii\web\AssetBundle;
class AppAsset extends AssetBundle
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [

How do i get AssetBundle to copy it into the assets folder to make it look like this

<link href="/frontend/web/assets/2edj2hj2jk/css/site.css" rel="stylesheet">

instead of this?

<link href="/frontend/web/css/site.css" rel="stylesheet">

or is there another way to achieve this?

@webroot/css is publicly accessible and will not be copied. I wonder why you want anything to be copied. If you get error check css file names do not match!

Thanks for replying. I’m using this plugin to push my assets to aws s3


Just thought it might be easier to have all static files on S3 and not have to upload it manually.

It should have managed everything for you if you followed instructions.
What problem are you facing with the extension?

it manages my assets in modules, but not sure how to get it to manage my assets in web/images, web/js and web/css`.

all my assets in modules are pushed to S3 just fine. except the ones in the directories i just mentioned.

this is what i have in my assetManager

'assetManager' => [
            'forceCopy' => (YII_ENV == 'dev') ? true : false,
            'appendTimestamp' => (YII_ENV == 'dev') ? false : true, 
            'bundles' => [
                'yii\web\YiiAsset' => [
                    'sourcePath' => '@app/web/js',
                    'js' => (YII_ENV == 'dev') ? ['site.js'] : ['site.min.js'],
                    'jsOptions' => ['defer' => true],
                    'publishOptions' => [
                        'only' => (YII_ENV == 'dev') ? ['site.js'] : ['site.min.js']
                'yii\widgets\ActiveFormAsset' => false,
                'yii\validators\ValidationAsset' => false,

                //override jQuery
                'yii\web\JqueryAsset' => [
                    'js' => ['https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js'],
                    'jsOptions' => ['type' => 'text/javascript'],
                'yii\bootstrap4\BootstrapAsset' => [
                    'sourcePath' => null, // do not publish the bundle
                    'css' => [
                'yii\bootstrap4\BootstrapPluginAsset' => [
                    'sourcePath' => null, // do not publish the bundle
                    'js' => [
                    'jsOptions' => ['defer' => true],

Just put them in non public DIR and do the same way you do in modules
I would not advise you to do multiple assets managements like that!