I had an application that stopped working whenever I added the debug flag in the middleware options.
Turned out it was because said source map included the string */ which would cause the browser to throw a SyntaxError when evaluating the prematurely closed comment.
My fix here breaks the regex that caused the problem, but I couldn't think of other ways to do this that wouldn't change the outcome. It could also be a comment in the inlined code.
Coverage remained the same at 83.537% when pulling e6ec536ad8208a08fc3e652314d6981e5e08a26d on feature/escapeCommentsInDebugSourceMaps into 9e7fc1da813eaeca0499b4c472ce75633884b35d on master.
I had an application that stopped working whenever I added the debug flag in the middleware options.
Turned out it was because said source map included the string
*/
which would cause the browser to throw a SyntaxError when evaluating the prematurely closed comment.This is the problematic line: https://github.com/assetgraph/systemjs-asset-plugin/blob/master/asset-plugin.js#L58
My fix here breaks the regex that caused the problem, but I couldn't think of other ways to do this that wouldn't change the outcome. It could also be a comment in the inlined code.