Just started to use browserify, but I cannot find documentation for how to get it spilling out minified output.
So I am looking something like:
$> browserify main.js > bundle.js --minified
We can also include browserify itself as a dependency, however it isn't a dependency for the project to run – any user to our app can find Superman without needing to run Browserify. It is one of our devDependencies – modules required for developers to make updates to this app.
Minifying is just removing unnecessary white-space and redundant like comments and semicolons. And it can be reversed back when needed. Uglifying is transforming the code into an "unreadable" form by changing variable names, function names, etc, to hide the original content.
Pipe it through uglifyjs:
browserify main.js | uglifyjs > bundle.js
You can install it using npm like so:
npm install -g uglify-js
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