php - Yii2 how to change default aliaes @vendor ==@app/vendor to @webroot/vendor -


now default aliaes

 @vender defaults @app/vendor. 

how change defaults @webroot/vendor.


ignore below info

when using assetsbundle in namespace repo.

namespace repo\assets;  use yii\web\assetbundle;  class repoasset extends assetbundle {    public $sourcepath = '@repo/media';    public $css = [     'css/site.css',   ];    public $depends = [     'yii\web\yiiasset',     'yii\bootstrap\bootstrapasset',   ]; } 

i can't publish depends asset.

the file or directory published not exist: /users/tyan/code/php/myii/repo/vendor/bower/jquery/dist 

but real location of jquery

/users/tyan/code/php/myii/vendor/bower/jquery/dist 

it happends bootstrapasset too.i try echo

@app //seems it's location /users/tyan/code/php/myii/repo @vendor //it's /users/tyan/code/php/myii/repo/vendor 

seems @app , @vendor add own namespace in automatically not make sence.

btw. define @repo aliases in web.php config file.

  'aliases' => [     '@repo' => dirname(__dir__),   ],   'controllernamespace' => 'repo\\controllers',  

because want change default namespace.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -