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
You have already answered your own question. I confirm that it is correct.
$ browserify X1.js X2.js --standalone XXX > bundle.js
If your command line supports expansion, you can use *
to include all files in a directory:
$ browserify *.js --standalone XXX > distribution/bundle.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