File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
lib/internal/Magento/Framework/Css/PreProcessor/Adapter/Less Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 55 */
66namespace Magento \Framework \Css \PreProcessor \Adapter \Less ;
77
8+ use Magento \Framework \App \Filesystem \DirectoryList ;
89use Magento \Framework \App \State ;
910use Magento \Framework \Css \PreProcessor \File \Temporary ;
1011use Magento \Framework \Phrase ;
@@ -40,6 +41,7 @@ class Processor implements ContentProcessorInterface
4041 * @var Temporary
4142 */
4243 private $ temporaryFile ;
44+ private DirectoryList $ directoryList ;
4345
4446 /**
4547 * Constructor
@@ -53,12 +55,14 @@ public function __construct(
5355 LoggerInterface $ logger ,
5456 State $ appState ,
5557 Source $ assetSource ,
56- Temporary $ temporaryFile
58+ Temporary $ temporaryFile ,
59+ DirectoryList $ directoryList
5760 ) {
5861 $ this ->logger = $ logger ;
5962 $ this ->appState = $ appState ;
6063 $ this ->assetSource = $ assetSource ;
6164 $ this ->temporaryFile = $ temporaryFile ;
65+ $ this ->directoryList = $ directoryList ;
6266 }
6367
6468 /**
@@ -73,7 +77,9 @@ public function processContent(File $asset)
7377 [
7478 'relativeUrls ' => false ,
7579 'compress ' => $ mode !== State::MODE_DEVELOPER ,
76- 'sourceMap ' => $ mode === State::MODE_DEVELOPER
80+ 'sourceMap ' => $ mode === State::MODE_DEVELOPER ,
81+ 'sourceMapRootpath ' => '/ ' ,
82+ 'sourceMapBasepath ' => $ this ->directoryList ->getPath (DirectoryList::TEMPLATE_MINIFICATION_DIR ) . '/pub/ '
7783 ]
7884 );
7985
You can’t perform that action at this time.
0 commit comments