在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/網(wǎng)絡(luò)安全  HTML/ 如何利用sourcemap去定位壓縮后的代碼位置

如何利用sourcemap去定位壓縮后的代碼位置

同事之前做的一些項(xiàng)目代碼用gulp壓縮后,用sourcemap生成的有.map文件。
后來(lái)同事離職了,然后現(xiàn)在我的工作郵箱收到了服務(wù)器發(fā)的這么一段錯(cuò)誤日志:

js 錯(cuò)誤Array
(

[msg] => Uncaught TypeError: Cannot read property 'status' of undefined
[file] => https://image.qnitem.dzsofts.net/js/copy_goods.min.js?qntag=153087588220171124
[url] => https://qnitem.dzsofts.net/html/copy_goods/index.html?tap1=1
[line] => 1
[col] => 58335
[error] => TypeError: Cannot read property 'status' of undefined
[trace] => TypeError: Cannot read property 'status' of undefined
at https://image.qnitem.dzsofts.net/js/copy_goods.min.js?qntag=153087588220171124:1:58335
at Object.error (https://image.qnitem.dzsofts.net/js/common.min.js?qntag=151756578120171124:1:3404)
at j (https://image.qnitem.dzsofts.net/js/jquery-1.11.1.min.js?qntag=145821312120171124:2:27244)
at Object.fireWith [as rejectWith] (https://image.qnitem.dzsofts.net/js/jquery-1.11.1.min.js?qntag=145821312120171124:2:28057)
at x (https://image.qnitem.dzsofts.net/js/jquery-1.11.1.min.js?qntag=145821312120171124:4:21868)
at XMLHttpRequest.b (https://image.qnitem.dzsofts.net/js/jquery-1.11.1.min.js?qntag=145821312120171124:4:25897)

)

之前看同事有利用Node命令弄了個(gè)什么配置文件后根據(jù)這個(gè)col找到了源代碼里的準(zhǔn)確位置,然而我這個(gè)萌新并沒(méi)用過(guò)這個(gè)……有沒(méi)有大佬指點(diǎn)一下這個(gè)是應(yīng)該怎么弄的??

回答
編輯回答
司令

去Npm上仔細(xì)看了下文檔,找到了,用的sourcemap的SourceMapConsumer.with這個(gè)API…………

2017年10月3日 03:13