Browsers don't have the require method defined, but Node.js does. With Browserify you can write code that uses require in the same way that you would use it in Node. Here is a tutorial on how to use Browserify on the command line to bundle up a simple file called main.js along with all of its dependencies: