docker-magento icon indicating copy to clipboard operation
docker-magento copied to clipboard

CSS SourceMaps not generating correctly - Magento 2.4.6 EE - Docker Magento Build 43.2 & 44

Open stephen-larkbury opened this issue 1 year ago • 1 comments

Description

After upgrading to Magento 2.4.6 EE on both docker-magento versions 43.2 and 44 and using grunt (as per setup instructions) i am getting a console error of DevTools failed to load source map: Could not load content for https://MYTHEME.local/static/version1678749398/frontend/MYTHEME/default/en_GB/css/pub/static/frontend/MYTHEME/default/en_GB/css/styles-l.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

(Replaced my actual theme name with MYTHEME)

The sourcemap file should be https://MYTHEME.local/static/version1678749398/frontend/MYTHEME/default/en_GB/css/styles-l.css.map

The issue seems to be the same as this ticket https://github.com/magento/magento2/issues/20952 Within the actual styles-l.css.map file it is adding a full directory path again to every file (see screenshot) Screenshot 2023-03-14 at 00 33 18

Steps To Reproduce

  1. This is occurring on the vanilla version of Magento 2.4.6 Enterprise when using the self install script and setting up grunt to run

Expected Result

Source maps should work as expected

stephen-larkbury avatar Mar 13 '23 23:03 stephen-larkbury

I've run into this issue before and found if I downgraded the "grunt-contrib-less" package to "1.4.1", that resolved the issue. Not sure why that resolves the issue but it's based off this SO thread: https://magento.stackexchange.com/questions/305851/magento-2-css-source-maps-not-working

magedevjosh avatar Mar 14 '23 22:03 magedevjosh