All Projects → goto-bus-stop → webpack-unpack

goto-bus-stop / webpack-unpack

Licence: other
extract modules from a bundle generated by webpack

Programming Languages

javascript
184084 projects - #8 most used programming language

webpack-unpack

extract modules from a bundle generated by webpack

npm travis standard

Install

npm install webpack-unpack

Usage

Pipe a bundle to it:

$ webpack-unpack < bundle.js
[
{"id":0,"source":"exports.test=function(t){console.log(t)},exports.boop=\"beep\"","deps":{}}
,
{"id":1,"source":"var n,r,o=module.exports={};/*..snip..*/","deps":{}}
,
{"id":2,"source":"(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var /*..snip..*/","deps":{"1":1}}
,
{"id":3,"source":"var r=require(2);require(0).test(r.join(\"whatever\",\"lol\"))","deps":{"0":0,"2":2}}
]

The output is a JSON array in the module-deps format.

API

var unpack = require('webpack-unpack')

var modules = unpack(source)

Return an array of module-deps objects from the bundle source string source.

License

Apache-2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].