You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
));
The text was updated successfully, but these errors were encountered:
realjjaveweb
changed the title
Map file incomplete URL
Map file incomplete source URL
Nov 20, 2019
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 URLThe text was updated successfully, but these errors were encountered: