-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Remove 'pub/' directory from paths in css source maps when compiling using grunt #38840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove 'pub/' directory from paths in css source maps when compiling using grunt #38840
Conversation
Hi @hostep. Thank you for your contribution! Add the comment under your pull request to deploy test or vanilla Magento instance:
❗ Automated tests can be triggered manually with an appropriate comment:
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
There's no good reason for this (I think), but let's run the automated test suite once... @magento run all tests |
@magento run Static Tests (this was supposed to be a quick and easy fix, see the first commit, but the static tests require me to change a lot of code, see the second commit) |
There is still one static test failure:
If somebody could give me a hint of how to fix this, that would be appreciated, I'm not a node.js developer, so it would take me too long to research a good solution. |
For me the source maps are not getting generated at all when compiling by using grunt. |
@Eddcapone, it sounds like you aren't using Magento 2.4.7 but probably a lower version? In that case you'll also need this fix: #28415, which got included in Magento 2.4.7 |
Thank you so much, I try to figure this out for a long time... I can confirm that there is /pub in the path and therefor you can't inspect the file in the developer tools: |
And that last one can be fixed by the first commit in this pull request: 8f0387c |
Confirmed. I've applied your fix and now it works as it is supposed to. |
Hello @hostep, Thank you for collaboration and contribution! ✔️ QA PassedPreconditions:
Steps to reproduce:
Before: ✖️ After: ✔️ Thank you. |
@magento run all tests |
Since builds are failed, moving it to Extended Testing. |
@magento run Static Tests |
@magento run Static Tests |
@magento run all tests |
@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE, Integration Tests, Unit Tests |
@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE |
The repeating Functional Tests B2B, Functional Tests EE and Functional Tests CE failures are flaky and know issues. Known issues: Known issues: Known issues: Hence moving this to Merge in Progress. |
4093281
into
magento:2.4-develop
Description (*)
When compiling css using grunt, and generating sourcemaps, the url's in the sourcemap point to .less files inside the
pub/
directory, which is not correct, as Magento's document root is set topub/
in the webserver config, sopub/
should not be in the url of the sourcemaps.Fixed with the help from reading the documentation from less:
Related Pull Requests
N/A
Fixed Issues (if relevant)
Manual testing scenarios (*)
pub/
directory in the path when hovering over a less filename in the inspector:Questions or comments
No automated test were added, I don't think we have tests for grunt workflows, or do we?
Contribution checklist (*)