当使用由 grunt-contrib-uglify 生成的源映射时,Chrome/Safari 中的调试器不会显示未修改的变量名称。源代码显示和调试正确。我已经验证源映射包含变量名称。这是uglify中的错误吗?
原始来源:
// two
function two()
{
var test = "test";
console.log("this is a " + test);
}
生成源:
function two(){var a="test";console.log("this is a "+a)}
//# sourceMappingURL=all.min.js.map
源图:
{
"version": 3,
"file": "all.min.js",
"sources": ["../src/two.js"],
"names": ["two","test","console","log"],
"mappings":";;AAEA,QAASA,OAEL,GAAIC,GAAO,MAEXC,SAAQC,IAAI,aAAeF",
"sourceRoot":"../"
}