`AssetLoader::$baseUrl` type allows `null`, but configuration does not
https://github.com/yiisoft/assets/blob/14984b2c8a87236da8c8ef5a4f1273d4ff8a36bc/src/AssetLoader.php#L50
https://github.com/yiisoft/assets/blob/14984b2c8a87236da8c8ef5a4f1273d4ff8a36bc/src/AssetLoader.php#L56
There's a mistake in the title, it's about basePath.
final class SliderAsset extends AssetBundle
{
public ?string $baseUrl = '@frontendAssetsUrl/modules/slider';
public ?string $basePath = '@frontend/public/assets/modules/slider';
public array $css = [
'slider.css',
];
public array $js = [
'slider.js',
];
}
Files of slider not changes and not has any transformations. In html url will be /assets/modules/slider/slider.js.
The logic:
Check for basePath here https://github.com/yiisoft/assets/blob/14984b2c8a87236da8c8ef5a4f1273d4ff8a36bc/src/AssetLoader.php#L56 and usege $path here
https://github.com/yiisoft/assets/blob/14984b2c8a87236da8c8ef5a4f1273d4ff8a36bc/src/AssetLoader.php#LL93-LL95
only if appendTimestamp = true. It mean i can set basePath = null .