1egoman / debundle

:card_file_box: A javascript debundler. Takes a Browserify or Webpack bundle and recreates the initial, pre-bundled source.
https://www.npmjs.com/package/debundle
706 stars 145 forks source link

fix name conflict issue #22

Open springrider opened 4 years ago

springrider commented 4 years ago

I am not sure the reason of this, but while using debundle, all the modules name are resolved as "index.js" as:

 * 40 => index
* Reconstructing require path for module 41...
* 41 => index
* Reconstructing require path for module 42...
* 42 => index
* Reconstructing require path for module 43...
* 43 => index
* Reconstructing require path for module 44...
* 44 => index
* Reconstructing require path for module 45...
* 45 => index
* Reconstructing require path for module 46...
* 46 => index
* Reconstructing require path for module 47...
* 47 => index
* Reconstructing require path for module 48...

then we only have one "index.js" file been overwritten again and again. append an id after it solves the problem.