Reputation: 339
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.
Upvotes: 15
Views: 7138
Reputation: 420
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"
]
}
Upvotes: 0
Reputation: 9822
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
Upvotes: 0
Reputation: 81
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
Upvotes: 8