This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-ac5a014c-fb5b-4e13-9b44-5cd8b6d75c10 XWIKI-23609 Open

Easier importmap declaration for webjars

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-57595825-3674-434a-8caa-6185183ba156 Manuel Leduc created this issue on 17/Oct/25 10:36
 
Summary: Easier importmap declaration for webjars
Issue Type: cid:jira-generated-image-avatar-ac5a014c-fb5b-4e13-9b44-5cd8b6d75c10 Improvement
Affects Versions: 17.8.0
Assignee: Unassigned
Components: Webjar
Created: 17/Oct/25 10:36
Priority: cid:jira-generated-image-static-major-37f48b3e-fc97-488f-a07e-914e059aa646 Major
Reporter: Manuel Leduc
Description:

After the following discussion https://matrix.to/#/!zdPfnFC0pUfwN5kZ4LKP2dXZ2jC266yFWKNeqgmJd4E/$v0UxX7d_Ql5TvgVFp0c7_Gw0-07D6WeOGoKzZwEBgcg?via=matrix.xwiki.com&via=matrix.org&via=uni-wuppertal.de

We concluded that in the context of xwiki we need a fine-grained way to provide frontend artifacts.
This is currently not easy, especially with javascript modules.

We propose to introduce a mechanism to declare importmap (https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap) directly in the metadata of webjars.
Then to

  1. scan them for inconsistencies (e.g., dependency declared but not available in the dependencies section)
  2. automatically scan for webjars with a provided importmap declaration, merge them, and automatically inject them in the header

See https://cryptpad.fr/code/#/2/code/view/Ys6GRleyIdQbZc7g+m4rnPMSYoLR9+lpqQ8EyBC-IHU/ for draft notes