JavaScript Importmap API
Version 5.1 by Manuel Leduc on 2026/02/13 16:20
Reference
The importmap extension scans for xwiki.extension.javascript.modules.importmap properties in installed extensions.
The content of the property is expected to be an object with:
- Keys corresponding to the IDs of JavaScript modules imported in the JavaScript bundled in the extension
- Values corresponding to the webjars reference to the module to resolve when the key is used for an import in the browser
The webjars reference is composed of ${groupId}:${packageId}/${pathInwebjar.js}.
The reference is checked at build time, and the build fails if the reference is not correctly resolved.
XWiki 18.1.0+ Transitive dependencies can be used in the values of the importmap.