diff --git a/src/web/AssetManager.php b/src/web/AssetManager.php index 54ebe67..946d2c7 100644 --- a/src/web/AssetManager.php +++ b/src/web/AssetManager.php @@ -54,11 +54,10 @@ protected function hash($path): string ->toString(); } - // @phpstan-ignore-next-line - $alias = Craft::alias($dir); + $pathFromRoot = StringHelper::removeLeft($dir, Craft::getAlias('@root/')); return FileHelper::sanitizeFilename( - preg_replace('/\/|@/', '-', $alias), + preg_replace('/\/|@/', '-', $pathFromRoot), ['asciiOnly' => true] ); }