Alias
You can find below default alias in yii2\BaseYii.php’s $alias:
$aliases variable's init:
@yii D:\xampp\htdocs\basic\vendor\yiisoft\yii2
basic\vendor\yiisoft\extensions.php file add extension path to @yii
yii2\web\Application.php's preInit method, create below alias:
setBasePath method:
@app means your Yii2's root directory, D:\xampp\htdocs\basic
setVendorPath method:
@vendor D:\xampp\htdocs\basic\vendor
@bower D:\xampp\htdocs\basic\vendor\bower
@npm D:\xampp\htdocs\basic\vendor\npm
setRuntimePath method:
@runtime D:\xampp\htdocs\basic\runtime
yii2\web\Application.php’s bootstrap method, create below alias
@webroot means your index.php path, in my sample, D:/xampp/htdocs/basic/web
@web is empty