support CSS sourcemaps #16985
Labels
c: Platform
For Matomo platform changes that aren't impacting any of our APIs but improve the core itself.
Technical debt
Issues the will help to reduce technical debt
Milestone
This is one thing that in my opinion would make developing CSS in Matomo a lot easier and more fun.
And now that we are using
wikimedia/less.php
it is finally possible to achieve:Issues like #16983 are unnecessarily hard to debug as all you see in the browser developer tools is
index.php:774
which contains a huge amount of CSS.Instead (probably only when development mode is enabled) Matomo should add an endpoint like
/index.php?module=Proxy&action=getCssSourcemap
that returns the CSS sourcemap, add a link to it at the end of the CSS output and therefore allow the browser to show helpful things likesomefile.less:123
allowing to immediatly fix the right file.Reasons why this might not be completely trivial (but still probably not that complex):
If this is too much work, there would be an easier method that only needs a rewrite of the LESS compilation code:
$options = array( 'sourceMap' => true );
and therefore append the sourcemap to the CSS fileThe text was updated successfully, but these errors were encountered: