user91579631 user91579631 - 1 year ago 86
Javascript Question

Browserify multiple files into a single bundle

Currently, I browserify a single js file into a bundle.js

$ browserify X1.js --standalone XXX > bundle.js

What if I have multiple js files and want to join them into a single browserified bundle.js

How should the command look like? Can I do something like this?

$ browserify X1.js X2.js --standalone XXX > bundle.js

I am using node.js v6

Answer Source

You have already answered your own question. I confirm that it is correct.

$ browserify X1.js X2.js --standalone XXX > bundle.js
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download