Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-23609

Easier importmap declaration for webjars

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 17.8.0
    • Webjar
    • None
    • Unknown

    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

      Attachments

        Activity

          People

            Unassigned Unassigned
            mleduc Manuel Leduc
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: