I have a third party library, non uglified which was bundled using browserify. Unfortunately the original sources are not available.
Is there a way to unbundled it into different files/sources.
I have a third party library, non uglified which was bundled using browserify. Unfortunately the original sources are not available.
Is there a way to unbundled it into different files/sources.
You should be able to 'unbundle' the pre-built Browserify bundle using browser-unpack.
It will generate JSON output like this:
It should be reasonably straight-forward to transform the JSON output into source files that can be required. Note that the mappings of
requireliterals (like"./todo") are in thedeps. That is, the module required as"./todo"corresponds to the source with anidof2.There is also a browserify-unpack tool - which writes the contents as files - but I've not used it.