https://github.com/nickw444/rn-debundle
A very basic debundler for Javascript bundles compiled with React Native's bundler
https://github.com/nickw444/rn-debundle
debundle react react-native reverse-engineering
Last synced: 12 months ago
JSON representation
A very basic debundler for Javascript bundles compiled with React Native's bundler
- Host: GitHub
- URL: https://github.com/nickw444/rn-debundle
- Owner: nickw444
- Created: 2019-11-02T03:36:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-05T09:59:47.000Z (almost 5 years ago)
- Last Synced: 2025-04-07T00:42:18.638Z (12 months ago)
- Topics: debundle, react, react-native, reverse-engineering
- Language: JavaScript
- Size: 21.5 KB
- Stars: 27
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## rn-debundle
A _very_ basic debundler for Javascript bundles compiled with React Native's bundler.
Debundles a large React Native bundle by walking the compiled AST and extracts individual module declarations and
writes them to their own modules & attempts to resolve dependeny import relationships.
### Install
```sh
npm install -g rn-debundle
```
### Usage
```sh
rn-debundle main.jsbundle ./my-output-dir
```
### Demo
**Input**
```js
__d(function() {
"use strict";
}, 0, []);
__d(function(v) {
"use strict";
}, 1, [0]);
var a = "foo bar baz";
```
**Output**
`main.js`
```js
var a = 'foo bar baz';
```
`mod_0.js`
```
'use strict';
```
`mod_1.js`
```
import v from './mod_0';
'use strict';
```