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.
npm install -g rn-debundle
rn-debundle main.jsbundle ./my-output-dir
Input
__d(function() {
"use strict";
}, 0, []);
__d(function(v) {
"use strict";
}, 1, [0]);
var a = "foo bar baz";
Output
main.js
var a = 'foo bar baz';
mod_0.js
'use strict';
mod_1.js
import v from './mod_0';
'use strict';