IMPR: File path

This commit is contained in:
Tony Air 2022-04-13 16:40:33 +02:00
parent d980a712c5
commit afb39c8b22

View File

@ -215,7 +215,16 @@ class DeferredRequirements implements TemplateGlobalProvider
return $url;
}
$path = WebpackTemplateProvider::toPublicPath($url);
$projectName = WebpackTemplateProvider::projectName();
$path = Path::join(
Director::publicFolder(),
RESOURCES_DIR,
$projectName,
'client',
'dist',
(strpos($url, '.js') ? 'js' : 'css'),
$url
);
$absolutePath = Director::getAbsFile($path);
$hash = sha1_file($absolutePath);