Answer the question
In order to leave comments, you need to log in
How to set path for Asset in Yii2?
Is it possible in yii2 to set the path for copying resources?
(Yii2 advanced, just in case)
In general, I protected-domain-dir/assets/less/
have a styles.less
.
It contains something like this:
@import "../../../vendor/bower-asset/bootstrap/less/bootstrap.less";
*.less
files (from vendor/bower-asset/bootstrap/less
), changes variables, and then saves to protected-domain-dir/assets/css/styles.css
a -file (minified with winless), which is then published via AppAsset. @webroot/css/styles.css
, and not to, @webroot/assets/хеш/styles.css
and put the font files in the same place? class AppAsset extends AssetBundle
{
public $sourcePath = '@app/assets/css';
public $css = [
'styles.css',
];
}
domain.com/assets/хеш/styles.css
domain.com/css/styles.css
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question