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

A CSS file inside a webjar cannot use a resource from that webjar

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 6.2-milestone-2
    • Fix Version/s: None
    • Component/s: Webjar
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Imagine a Webjar containing 2 files: style.css and style2.css.
      In style.css, we have "import 'style2.css';"
      Pb: the browser will not be able to reach style2.css.

      Explanations:
      The webjar module generates an URL like this:
      /xwiki/bin/webjars/resources/path?value=bootstrap/3.2.0/css/style.css

      So when style.css mentions "style2.css", the browser will try to reach:
      /xwiki/bin/webjars/resources/style2.css which, of course, will not work.

      What we need is to generate URLs like this (without query string):
      /xwiki/webjars/bootstrap/3.2.0/css/style.css

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vmassol Vincent Massol
                Reporter:
                gdelhumeau Guillaume Delhumeau
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: