Skip to content
ghybs edited this page Mar 4, 2018 · 83 revisions

RequireJS allows you to write loader plugins that can load different types of resources as dependencies, and even include the dependencies in optimized builds.

Some plugins may also work with other AMD loaders like curl and backdraft, compatibility isn't ensured though, some plugins may require access to RequireJS internal methods to work.

For info about how to use and/or write plugins, check the documentation.

List of plugins curated by the community

  • domReady by James Burke
    • Waits for the DOM to be ready for modifications. Includes domReady.withResources(), which is RequireJS-specific. However the basic domReady plugin should be usable in other AMD loaders.
  • i18n by James Burke
    • Localization plugin. Loads dependencies based on the locale.
  • text by James Burke
    • Loads dependencies as plain text files.
  • step by James Burke
    • Loads scripts in steps. Only works with AMD loaders that support module config, like RequireJS 2.0. Prefer the RequireJS 2.0 shim config over this when possible.
  • order by James Burke
    • Evaluate scripts in sequence. Useful for non-AMD modules which should be loaded in sequence. Only works with RequireJS, not other AMD loaders. Only works in RequireJS 1.0, not in RequireJS 2.0. Use shim config or the step plugin instead.
  • cs by James Burke
    • Load CoffeeScript files and also compiles modules into JavaScript during optimization.
  • amd-loader by Guy Bedford
    • A base plugin helper to easily make template and compiler plugins.
  • ES6 (Traceur) by Guy Bedford
    • Dynamically load and build ES6 modules using Traceur.
  • ES6 (Babel) by Mikach
    • Dynamically load and build ES6 modules using Babel.
  • CJS by Guy Bedford
    • Load CommonJS modules from RequireJS dynamically supporting cross origin and builds.
  • CJS2 by ghybs
    • Like CJS but recursively loads sub-dependencies through CJS2, unless specified otherwise in the require configuration.
  • font by Miller Medeiros
  • html by DejaMi
    • Loads HTML files and partials.
  • image by Miller Medeiros
    • Loads image files.
  • json by Miller Medeiros
    • Loads JSON files and parses it. Converts it into JS during optimization.
  • mdown by Miller Medeiros
    • Loads Markdown files and compiles into HTML, will also work during optimization.
  • require-css by Guy Bedford
    • Fully compatible CSS requiring and build optimization.
  • require-less by Guy Bedford
    • Extends require-css, allowing for LESS injection and builds.
  • requirejs-link by Gabriel Reitz Giannattasio
    • Create link element, detecting it file extension (css or html), append it to DOM and return the
  • export by Sam Armstrong
    • Loads text files and parses it based on comments. Converts it into JS during optimization.element. (It's a fork of the text plugin).
  • require-yaml by Frederik Ring
    • Loads YAML files and compiles them into plain JavaScript objects using js-yaml, will also work during optimization.
  • l20n by Fernando Gómez
    • Localization with l20n.
  • factory by Tobias Bosch (Obsolete: Overcome by another project)
    • Allow calling the module factory function multiple times passing different mock objects.

  • async by Miller Medeiros
    • Load asynchronous scripts (e.g. Google Maps) and also for JSONP.
  • depend by Miller Medeiros
    • Load JS files that have dependencies but aren't wrapped into define calls.
  • fingerprint by Meinaart van Straalen
    • Add a fingerprint when loading a resource via RequireJS while maintaining original module name. Fingerprint can be configured via config.
  • goog by Miller Medeiros
  • noext by Miller Medeiros
    • Load scripts without appending the ".js" extension, useful for dynamic scripts.
  • use by Tim Branyen
    • Load JS files that aren't wrapped into define calls with the option to set dependencies and the value that should be used by the module.
  • wrap by Dave Geddes
    • Wrap regular scripts as AMD modules.
  • cache by Jens Arps
    • Store modules in localStorage
  • feature by Jens Arps
    • Load different implementations of same functionality by providing an implementation map or feature tests the HTML page is still streaming.
  • replace by Simon Boudrias
    • Modify script paths based on a pattern and value specified. (Useful for third-party i18n sdk)
  • registry by Dmitry Kuznetsov
    • Wrap for requirejs.config(). Extended work with config.
  • shim by Brett Zamir
    • Conditional shim loading, avoiding additional document loads when the feature is already detected as supported
  • priv by Brett Zamir
    • Experimental wrapper for AsYouWish Firefox add-on API allowing privileged access to Firefox's internal Addon SDK (also using require() in its own API) from regular client-side HTML
  • namespace by Ates Goral
    • Boilerplate-free creation of nested namespaces.
  • rq by Avishek Sen Gupta
    • A RequireJS plugin to transparently load modules which return Q promises.
  • promise by Ron Waldon
    • This is a plugin for Require.JS that allows modules to resolve asynchronously via jQuery Promises.
  • promiseme by Andrei Neculau
    • Load async modules that return Promises.
  • loader by Robert Thompson
    • Load multiple modules into an one object.
  • locate by Ates Goral
    • An experimental Service Locator implementation that doesn't require consumer modules to know about a global Service Registry.
  • proc by Denis Sikuler
    • Loads resource file using specified plugin, applies some procedure/transformation to resource's content and returns result of transformation.
  • view by Denis Sikuler
    • Loads text/html file using text! plugin, parses and processes dependency directives in the file content, removes/replaces them in the content and loads the specified dependencies before returning result. The "refined" file content will be returned as resource value.
  • stub by Ates Goral
    • Stub loader plugin to completely disable a loader plugin during optimization.
  • bower by Rodney Ebanks
    • Plugin for creating & loading Path/Shim configurations automatically from bower.json dependencies.
  • config by Rodney Ebanks
    • Plugin for obtaining the requirejs.config object.
  • rq-dir by Daniel Bartholomae
    • Plugin for rescursively requiring files from a directory when using RequireJS in Node.js
  • lodash-requirejs-loader-plugin by Martin Hansen
    • Load lodash AMD with _!map,reduce,flatten syntax. Avoids build bloat. Optimized loading during development.