Sourcemap-Stacktrack-Parser
解析Stacktrack中的源码位置
根据sourcemap将解析stacktrack
Installing / Getting started
npm i sourcemap-stacktrack-parser
// ======== Input Data =======const error = stack: "ReferenceError: xxx is not defined\n" + " at http://localhost:7001/public/bundle.e7877aa7bc4f04f5c33b.js:1:1392\n" message: "Uncaught ReferenceError: xxx is not defined" // 非必须 filename: "http://localhost:7001/public/bundle.e7877aa7bc4f04f5c33b.js" // 非必须;// ====== Run ==========const parser = ; //sourcemap文件位置const originStack = await parser;// ====== Result ========= source: "webpack:///src/index.js" line: 24 column: 4 name: "xxx"