JavaScript Importmap API

Version 2.1 by Manuel Leduc on 2026/01/20 11:55

Content

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.

Get Connected