Skip to content
This repository

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

Official Plugins

  • 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.

File Type

  • 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 by Guy Bedford
    • Dynamically load and build ES6 modules using Traceur.
  • CJS by Guy Bedford
    • Load CommonJS modules from RequireJS dynamically supporting cross origin and builds.
  • font by Miller Medeiros
  • 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 <!-- export --> comments. Converts it into JS during optimization.element. (It's a fork of the text plugin).

Templating

  • jade by Dan Williams
    • For jade templates.
  • handlebars and sc-handlebars by Alex Sexton
    • For (Sproutcore) Handlebars Templates
  • micro-templates by Julien Cabanès
  • micro-templates Updated fork by Eero Anttila. This version works with latest r.js and with both Node and Rhino. The implementation is based on latest text plugin and latest _.template
  • mustache / hogan by Miller Medeiros
    • For mustache templates, compiles templates during build.
  • speck by Will Shaver
  • underscore by Denis Ciccale
  • Lo-Dash Template Loader by Tim Branyen
    • For Lo-Dash or underscore templates. Always serves the compiled function, default extension and root, configurable tempateSettings, and works in R.js, Dojo, and Curl.js loaders.
  • html by Gabriel Reitz Giannattasio
    • For native HTML parsers (useful with Web Components and AngularJS)

Localization/Internationalization

  • l20n by Fernando Gómez
    • Localization with l20n.

Unit Testing

  • factory by Tobias Bosch (Obsolete: Overcome by another project)
    • Allow calling the module factory function multiple times passing different mock objects. ***

Script Helpers

  • 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.
  • 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.

Miscellaneous

  • 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 text/html file using some plugin (text! by default), applies some procedure/transformation to file'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.
Something went wrong with that request. Please try again.