Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

SourceMap - Producing invalid JSON #242

@am11

Description

@am11

Cc: sass/node-sass#218

Like LESS, please replace \ with \\ in file paths in .map files.

Here is what I am getting:

{
    "version": 3,
    "file": "C:\Users\Adeel\Documents\Visual Studio 2013\WebSites\WebSite1\1\2\3\SASS\cd.scss",
    "sources": [
        "C:\Users\Adeel\Documents\Visual Studio 2013\WebSites\WebSite1\1\2\3\SASS\cd.scss"
    ],
    "names": [

    ],
    "mappings": "AAsCA;EACI,QAAQ;;AAGZ,MAAM,OAAO,UAAU;EArCnB,aAAa;EAwCb,WAAW;;AAEf,IAAI,IAAI,IAAI,IAAI;EA1CZ,aAAa;;AA8CjB;EACI,OAAO;EACP,WAAW;EACX,YAAY;EACZ,eAAe;;AAEnB;EACI,WAAW;;AAEf;EACI,OAAO;EACP,YAAY;;AAEhB;EA3DI,aAAa;EA8Db,WAAW;;AAGf;EACI,YAAqC;EACrC,YAAY;EAEZ,eAAe;EAJnB,UAKI;IACI,QAAQ;IACR,kBAAkB;;AAKtB;EADJ,MAEQ;IAAQ,SAAS;EAFzB,MAGQ;IAAQ,SAAS;AAErB;EALJ;IAMQ,SAAS;IANjB,MAOQ;MAAQ,SAAS;AAErB;EATJ;IAUQ,SAAS;IAVjB,MAWQ;MAAQ,SAAS;AAXzB,MAcI;EAAK,QAAQ"
}

which is an invalid JSON

The expected result (the valid JSON) can be achieved by replacing \ in file paths with \\.

Also, (OAN) the value of file is supposed to be path to output CSS, not the input SCSS (sass/node-sass#219).

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions