Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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? I have bundle.js file with me bundled with 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. Is there any possible way to achieve this?

like image 741
Nutan Avatar asked Aug 25 '17 11:08

Nutan


2 Answers

Do you still have your source map files by any chance (e.g. 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://

enter image description here

like image 138
Yakov Fain Avatar answered Oct 18 '22 10:10

Yakov Fain


You may try using debundle node module.

Debundle

like image 36
uruapanmexicansong Avatar answered Oct 18 '22 09:10

uruapanmexicansong