问题描述
我想撤消bundle.js或将其解除捆绑.目前,我正在将bundle.js加载到我的浏览器(Chrome浏览器)中Chrome浏览器检测到了源地图,并向我展示了一个不错的结构基于捆绑的完整应用程序.该应用程序已捆绑使用webpack,它是一个flux react应用程序.
I want to reverse or unbundle a bundle.js.Currently I am loading the bundle.js in my browser (Chrome)Chrome detects the sourcemap and shows me a nice structure of thefull application based on the bundle. The application is bundledusing webpack and is a flux react application.
是否有一种方法可以从捆绑包中生成所有这些文件,所以我可以可以根据应用程序结构轻松浏览捆绑软件?
Is there a way to generate all these files out of the bundle so I caneasily browse the bundle based on the application structure?
这是一个反向工程项目,可从中获取应用程序源现有的捆绑包.
This is for a reverse engineering project to get the application source froman existing bundle.
因此在chrome中,我可以使用devtools源很好地浏览整个应用程序.并查看所有单个文件.但我想创建一个确切的我的本地驱动器上的结构相同.
So in chrome I can nicely browse the whole application using devtools sources.and see all the individual files. But I would like to create that exactsame structure on my local drive.
我正在尝试使用 debundle 之类的工具,但是我找不到将源地图添加到其中的方法这次转换?
I was trying a tool like debundle But I cannot find a way to add the sourcemap to this conversion?
如果有以下情况,我可以轻松地将现有的bundle.js解除捆绑:
So can I easily unbundle an existing bundle.js if:
- 源地图可用
- Chrome可以轻松地向我显示结构和单个文件
- 捆绑包没有缩小或混乱.
- 捆绑包是使用webpack创建的
推荐答案
我发现 shuji 一个不错的选择-您只需提供源映射的路径即可.它完全解开了我用babel和webpack制作的示例捆绑包.不过,它不会保留文件夹结构,所有文件最终都放在一个文件夹中.
I found shuji to be a good option - you just provide the path to the sourcemap to it. It unbundled an example bundle I made with babel and webpack perfectly. It doesn't preserve folder structure though, all of the files just end up in one folder.
这篇关于将Webpack bundle.js与SourceMap解除捆绑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!