7

I am using Browserify and Grunt to bundle our RendrJS webapp. I would like to analyze the bundle to see which modules it contains to see if any code is superfluous. This can happen since in Rendr some js code might only run on the server.

How do I get a list of the contents of the bundle. I have tried:

browserifyOptions: { 'list': true }

but it doesn't seem to have any effect. We are using Browserify 2.

Skanaar
  • 370
  • 2
  • 9
  • browserify v2.x is rather old...any chance you could update that? – JMM May 07 '15 at 20:06
  • of course, but if it does not solve the problem it is a separate concern – Skanaar May 08 '15 at 11:53
  • It's an integral concern for me because I'm not even going to attempt to answer the question in the context of v2. It's up to you -- if you're not committed to v2 you can update your question to say that. – JMM May 11 '15 at 12:55

1 Answers1

7

Saw your question, dug up a tiny old script and just now pushed browserify-inspect-bundle to npm, grab it here:

https://www.npmjs.com/package/browserify-inspect-bundle

Usage is:

npm install -g browserify-inspect-bundle
browserify-inspect-bundle /path/to/your/bundle.js

This should get you something useful.

maligree
  • 5,939
  • 10
  • 34
  • 51