简体   繁体   English

有没有办法将webpack捆绑的js文件转换成源代码ts?

[英]Is there any way to convert webpack bundled js file into source code ts?

Is there any way to convert webpack bundled js file into source code ts?有没有办法将webpack捆绑的js文件转换成源代码ts? I have bundle.js file with me bundled with webpack.我有 bundle.js 文件与 webpack 捆绑在一起。 Unfortunately the source code files are deleted by a stupid accident.不幸的是,源代码文件被一个愚蠢的意外删除了。 I want to reverse engineer my bundle.js file to get back my source code typescript files.我想对我的 bundle.js 文件进行逆向工程以取回我的源代码打字稿文件。 Is there any possible way to achieve this?有没有可能的方法来实现这一目标?

Do you still have your source map files by any chance (eg main.bundle.js.map )?你是否仍然有你的源地图文件(例如 main.bundle.js.map )? If so, you can run your app (ng serve), open the Chrome Dev Tools in your browser and you'll see your sources in TypeScript under the tab Sources -> webpack://如果是这样,您可以运行您的应用程序(ng serve),在浏览器中打开 Chrome Dev Tools,您将在 Sources -> webpack:// 选项卡下看到 TypeScript 中的源代码

在此处输入图片说明

You may try using debundle node module.您可以尝试使用debundle节点模块。

Debundle解绑

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM