Skip to content

Ressources included in CSS with a relative path are broken #10378

Closed
@cyrilletuzi

Description

@cyrilletuzi

Versions

cli 6.0.0-rc.5

Repro steps

  • Create a new projet with last RC
  • In src/style.css, include a ressource with a relative path, like a font:
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: local('Material Icons'),
       local('MaterialIcons-Regular'),
       url(fonts/material-icons.woff2) format('woff2');
}

Observed behavior

If the ressource is small, it's inlined with data: so it works.
If the ressource is big, the path is transformed to an URL relative to the current location, so:

  • if you go in the app from the domain (/), it works (URL will be http://www.example.com/material-icons.woff2)
  • but if you go directly in some page of the app (like /page/2), it fails (URL will be http://www.example.com/page/material-icons.woff2)

Desired behavior

Should work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P5The team acknowledges the request but does not plan to address it, it remains open for discussion

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions