Skip to content

Less SourceMaps Path is not corret #20952

Closed
@gizmocn

Description

@gizmocn

Summary (*)

Grunt generate wrong less sourceMaps path, both Chrome and Firefox can not find sourceMaps files

Environment

OS: Ubuntu 18.04 with apache and php 7.1.x
Magento Version: 2.3.0

How to Reproduce

  1. Download Magento 2.3.0 Open Source with Sample from Official Site.
  2. Install it on local server.
  3. Install and configure grunt according to https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css_debug.html
  4. Run: grunt clean, grunt exec, grunt less:luma.
  5. Browser can not find less sourceMaps files.

It is very difficult to reproduce on on vanilla Magento instance, as the issue need a lot of CLI operations to install node.js, npm etc.

Examples (*)

Use Grunt to compile Less file, and Grunt add sourceMaps path is:
/*# sourceMappingURL=pub/static/frontend/Magento/luma/en_US/css/styles-l.css.map */
In order to let browser to find the sourceMpas file, it should be
/*# sourceMappingURL=styles-l.css.map */

Proposed solution

Try to change less.js but failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: DeveloperIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releasehelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions