mirror of
https://github.com/mrclay/minify.git
synced 2025-08-06 22:26:28 +02:00
add base directory of input file to import path
this is needed for @import to be able to resolve included files
This commit is contained in:
@@ -145,7 +145,13 @@ class Minify_ScssCssSource extends Minify_Source {
|
||||
{
|
||||
$start = microtime(true);
|
||||
$scss = new Compiler();
|
||||
$css = $scss->compile(file_get_contents($filename), $filename);
|
||||
|
||||
// set import path directory the input filename resides
|
||||
// otherwise @import statements will not find the files
|
||||
// and will treat the @import line as css import
|
||||
$scss->setImportPaths(dirname($filename));
|
||||
|
||||
$css = $scss->compile(file_get_contents($filename), $filename);
|
||||
$elapsed = round((microtime(true) - $start), 4);
|
||||
|
||||
$v = Version::VERSION;
|
||||
|
Reference in New Issue
Block a user