-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Labels
Description
Not sure if there is still someone supporting this project, however I've noticed latest wp.org version generates map file with sources defined relatively to main domain, so if wordpress is in subdirectory (like domain.tld/blog/) this will be generated in example.css.map
"sources":["wp-content\/themes\/sometheme\/scss\/example.scss"]
which browser (at least Chrome) will translate to
domain.tld/wp-content/themes/sometheme/scss/example.scss
<= notice the missing /blog/ part
Note: this may or may not be related to issue #105
FIX:
In class/class-wp-scss.php when calling setSourceMapOptions() sourceRoot should reffer to home URL
$scssc->setSourceMapOptions(array(
'sourceMapWriteTo' => $instance->css_dir . $map, // absolute path to a file to write the map to
'sourceMapURL' => $map, // url of the map
'sourceMapBasepath' => rtrim(ABSPATH, '/'), // base path for filename normalization
// FIX: this was previously just '/'
'sourceRoot' => home_url('/'), // This value is prepended to the individual entries in the 'source' field.
));
garrettw