talira

RequireJS

JavaScript file and module loader implementing AMD, with an optimizer for production builds

open sourceMITfree

RequireJS is a JavaScript file and module loader that implements the Asynchronous Module Definition (AMD) API. It's optimized for the browser, including Web Workers, and also runs in other JavaScript environments such as Rhino and Node. It loads modules with plain script tags for easy debugging, can load existing JavaScript files without rewriting them, and includes an optimization tool that combines and minifies code as part of packaging for deployment. It installs from npm (requirejs) and is MIT licensed.

Problems it solves

  • I maintain an older web app built on AMD modules and need its loader
  • I want to load JavaScript files on demand in the browser without a bundler
  • I need to package an AMD codebase into optimized files for deployment

Features

  • AMD module loader for the browser and Web Workers
  • Runs in Rhino and Node
  • Loads modules with plain script tags
  • Loads existing JavaScript files without rewriting
  • Optimizer for production builds

Alternatives

The same job

These do what RequireJS does.

  1. SystemJS Hookable, standards-based module loader that runs production ES module builds in older browsers

Compare RequireJS with the top 3