I am working on a project where I have to statically analyse JavaScript code. However, for a few libraries, I only have access to a minified version of the file and the corresponding source-map. Is there a method/technique with which I can generate the original file using these files?
我找到了一个可以帮助做到这一点的 node.js 库: Maximize Corresponding github repo
If your objective is "just" to do a onetime re-construction of the original source code I did it using:
Depending on filesize it may take a while to view the results.
The correspoding Repo is here
This command line tool is really easy to use
npx uglify-js ugly.js -b --source-map "filename='ugly.js.map'" -o beauty.js
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.