Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-3470

Easier importmap declaration for webjars

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 18.0.0-rc-1
    • 17.8.0
    • Javascript
    • None
    • Unknown
    • Awaiting Committer feedback

    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

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

            Dates

              Created:
              Updated:
              Resolved: