diff --git a/src/Asset/CssOptimizer.php b/src/Asset/CssOptimizer.php index e942011..40c6b5f 100644 --- a/src/Asset/CssOptimizer.php +++ b/src/Asset/CssOptimizer.php @@ -111,11 +111,7 @@ class CssOptimizer extends AssetOptimizer { */ protected function updateUrls($contents, $path) { // Determine the file's directory. - $directory = '/' . dirname($path); - - // If the file is in the current directory, make sure '.' doesn't appear in - // the url() path. - $directory = $directory == '.' ? '' : $directory . '/'; + $directory = base_path() . dirname($path); // Alter all internal url() paths. Leave external paths alone. We don't need // to normalize absolute paths here because that will be done later.