AssetBundle Not Working as Advertised

I’m having trouble with something that should be straightforward. I’m attempting to register an asset bundle in my view and for the life of me I can’t get the thing to work. Here is the code for the asset bundle:

namespace frontend\assets;

use yii\web\AssetBundle;

class LoginAsset extends AssetBundle


    public $basePath = '@webroot';

    public $baseUrl = '@web';


    public $css = [				










    public $js = [

















    public $depends = [







And here is the snippet of the view where I’m using it:

use frontend\assets\LoginAsset;

use yii\widgets\Breadcrumbs;

/* @var $this \yii\web\View */

/* @var $content string */


And her is the directory structure where the assets are located:

frontend–>web —>login

all of the assets are in this folder and subfolders

And I’m not getting any errors – just none of the assets are being registered. Any idea what I’m doing wrong?


Are the locations like


accessible by the user directly or are you expecting the assets to get published?

I just had that issue and basically removed




and replaced it with



With that my assets get published and it works.

Btw… If you’re working with the YiiDebugger you can look at all published assets and the paths that get used.

Hope that helps…