CHAPTER 6

image

Browserify

Less is more.

—Ludwig Mies van der Rohe

Browserify is a JavaScript module loader that works around the language’s current lack of support for importing modules within the browser by serving as a “pre-processor” for your code. In much the same way that CSS extensions such as SASS and LESS have brought enhanced syntax support to stylesheets, Browserify enhances client-side JavaScript applications by recursively scanning their source code for calls to a global require() function. When Browserify finds such calls, it immediately loads the referenced modules (using the same require() function that is available within Node.js) ...

Get JavaScript Frameworks for Modern Web Dev now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.