package
> Get the source code information from the compiled file and error information location through source map
npm install source-map-to-codeGitHub-flavored package documentation.
Across all versions, last 30 days.
20 in 30 days
Runtime metadata.
Get the source code information from the compiled file and error information location through source map
yarn add source-map-to-codeconst { printSourceCodeInfo, getSourceCodeInfo } = require('source-map-to-code')
printSourceCodeInfo({
filePath: './build/static/js/main.4e7cf41f.js',
position: {
line: 3,
column: 0
}
})
// print
Source code file path:
./es6/test.js
Source code snippets:
2 var isTest = true
3 const version = window.version <------ Error(3:0)
4 console.log(version)
Estimated unpacked size across 2 packages.
464.7 kB
Includes dependencies.