15

I'm using visual studio 2013.

I'm using the web essential tool for my less/css files.

when I'm saving a less file it's add a line like the one below to the end css file,for example:

/*# sourceMappingURL=filename.css.map */

how can I stop the vs2013 from adding this?

I went to the web essential options and disable the option called: "create source map files" and I change it to false,it's not creating map files but still add the line above to the css file.

1
  • Step 1: Uninstall Web Essentials. Step 2: Win Commented Nov 4, 2015 at 15:40

3 Answers 3

8

I am also using VS2013. And preprocessor SASS. When I edit a file .scss that is updated .css file and the file appears .css.map that is added to the project.

It turned out that it tricks WEB-essential plugin. Along this path

Tools > Options > Web Essentials > SASS > Create source map files = false

I was able to disable the automatic creation of files .css.map and

Also in the settings there is a way for LESS: Tools > Options > Web Essentials > LESS

Sign up to request clarification or add additional context in comments.

1 Comment

In VS2015 I don't see that option after installing Web Essentials.
0

First remove all existing mappings from your code (find and delete lines starting with /*# sourceMappingURL= )

Then recompile using WebEssentials > Re-compile all LESS files

I had the same issue as you did and in my case this solved the issue

Comments

0

Inside your Project Create a (.vscode) Directory. In the .vscode folder create a json file named settings.json. Inside of the settings.json, type following key-value pairs. By the way you'll get intelli-sense. You can assign the key-value of "liveSassCompile.settings.generateMap" true or false. I hope this will work

{
 "liveSassCompile.settings.formats":[
    {
        "format": "expanded",
        "extensionName": ".css",
        "savePath": "/css"
    },
    {
        "extensionName": ".min.css",
        "format": "compressed",
        "savePath": "/dist/css"
    }
],    
"liveSassCompile.settings.generateMap": false,
"liveSassCompile.settings.autoprefix": [
    "> 1%",
    "last 2 versions"
]
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.