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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • 6.2-milestone-2
    • Webjar
    • None
    • Unknown
    • N/A
    • N/A

    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

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

              Dates

                Created:
                Updated:
                Resolved: