Quantcast
Channel: ajaxmin Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 683

Commented Unassigned: Minification with sourcemaps hangs while debugging [21834]

$
0
0
When I create a minified file with sourcemapping enabled, debugging will hang on the creation of the minified file. I can find a reference to this problem in the [WebEssentials 2012 source code](https://github.com/madskristensen/WebEssentials2012/blob/31c2b578efed1eaf941c58fae0a88dc97e19cfec/EditorExtensions/Commands/JavaScript/JavaScriptSaveListener.cs#L91), but I cannot find any other mention of this problem...

This is a piece of code that will reproduce the bug (the debugger hangs on the minifier.MinifyJavaScript() call):

```
var mapBuilder = new StringBuilder();
using (var writer = new StringWriter(mapBuilder))
using (var sourceMap = new V3SourceMap(writer))
{
var minifier = new Minifier();
var settings = new CodeSettings
{
EvalTreatment = EvalTreatment.MakeImmediateSafe,
PreserveImportantComments = false,
SymbolsMap = sourceMap,
TermSemicolons = true
};

sourceMap.StartPackage(scriptPath, mapPath);
minified = minifier.MinifyJavaScript(concatedScripts, settings);
}
```

This only happens if files are concated with the ```///#source 1 1 ``` comment.
Comments: ** Comment from web user: benmccallum **

+1


Viewing all articles
Browse latest Browse all 683

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>