
Discussion: Browserify or RequireJs? - ep103
I&#x27;d love to hear the community&#x27;s take on this.  I&#x27;ll also start a poll, but feel free to start a discussion!
======
briantakita
They serve two slightly different purposes.

Browserify is a build time tool which enables the programmer to combine files
and have a module structure within this single packaged file. This affords
practical flexibility, such as dynamically requiring files (as long as the
dynamically required modules are required in a manifest module with it's own
require method).

RequireJs is a runtime tool, in which you load modules from the browser.

You can use both by packaging files together using browserify and dynamically
loading these packaged files using requirejs.

I personally use browserify and have my own lightweight dynamic loader. This
allows me to be free of the requirejs boilerplate logic in every file.

One cool thing about Browserify if you can package a bunch of lightweight &
focused javascript snippets you find on the internet, instead of using
heavyweight libraries. Often times, the essential nugget of logic is tiny,
compared to the boilerplate, cruft, & edge case concerns of the library.

------
cnp
Browserify. I've never understood why people who are not constructing truly
_massive_ applications decide to go with Require.js, because in the end you
just run r.js against the build to concatenate anyways. And the whole notion
of "requiring" libraries via a shim --those libraries, once shimmed, end up
being globals anyways. Browserify is a one-liner, with a clean syntax, which
also has a vast plugin system for performing further operations --also one-
liners.

------
ep103
Poll: Browserify

------
ep103
Poll: RequireJs

