RequireJS Module Config

Last modified by Vincent Massol on 2021/07/22

Publishes a RequireJS module


This extension point can be used to publish a RequireJS module to the global RequireJS configuration, allowing others to use the module without specifying its path.


This Extension Point is contributed by this extension and was added in version 12.3-rc-1 of that extension.

Extension Id
Content to be provided
No content is expected to be provided by the user of this Extension Point.
Parameters to be provided
  • id: the RequireJS module id
  • path: maps to require.config.paths
  • bundles: optional, maps to require.config.bundles
  • deps: optional, maps to require.config.shim.deps
  • exports: optional, maps to require.config.shim.deps
  • config: optional, maps to require.config.config


For instance, using this extension point with the following parameters:

path=$xwiki.getSkinFile('uicomponents/suggest/suggestAttachments.js', true)

allows others to write:

require(['xwiki-suggestAttachments'], function(...) {
  // ...

anywhere in XWiki.

Get Connected