Tag: Commonjs
Posts of Tag: Commonjs
  1. RequireJS: How to define modules that contain a single "class"?

    I have a number of JavaScript "classes" each implemented in its own JavaScript file. For development those files are loaded individually, and for production they are concatenated, but in both cases I have to ma...Learn More
  2. browserify circular dependency: something is not a function

    I've recently started writing CommonJS modules but facing issues in requiring modules. Why is storage.js unable to reach the example module which I have required? What is the proper way to require a dependent m...Learn More
  3. Bests practice for Browserify in large web projects - Gulp

    Here is the thing, I come from a world where you have several js files included to a web page. Some are always included in the page (your libs, menu etc...) and others are depending on the current page (js for...Learn More
  4. Avoiding re-evaluation and dynamically unloading objects called with `require`

    i'm studying how nodejs module system works. I've found so far this literature: https://nodejs.org/api/modules.html http://fredkschott.com/post/2014/06/require-and-the-module-system/ http://www.bennadel.com/...Learn More