diff --git a/src/AssetMapper/SassPublicPathAssetPathResolver.php b/src/AssetMapper/SassPublicPathAssetPathResolver.php index 053b66d..8ce8b53 100644 --- a/src/AssetMapper/SassPublicPathAssetPathResolver.php +++ b/src/AssetMapper/SassPublicPathAssetPathResolver.php @@ -21,8 +21,8 @@ public function resolvePublicPath(string $logicalPath): string { $path = $this->decorator->resolvePublicPath($logicalPath); - if (str_contains($path, '.scss')) { - return str_replace('.scss', '.css', $path); + if (str_ends_with($path, '.scss')) { + return substr($path, 0, -5).'.css'; } return $path; @@ -32,8 +32,8 @@ public function getPublicFilesystemPath(): string { $path = $this->decorator->getPublicFilesystemPath(); - if (str_contains($path, '.scss')) { - return str_replace('.scss', '.css', $path); + if (str_ends_with($path, '.scss')) { + return substr($path, 0, -5).'.css'; } return $path;