When you bundle your code with Browserify, each module you use is inlined in the resulting output and labeled with its local file path. So you can see file path strings in your bundled code.
But in theory, these strings could all be rewritten to "1", "2", etc, which might be a security advantage in some situations (and would save a few bytes).
Is there any option for this, or some transform that will do it? (It would have to rewrite the labels for each inlined module, and all the corresponding require calls.)
Seems that 6 months after your question, Browserify's author James Halliday put Bundle Collapser out there. It does pretty much exactly what we were both after.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With