vuejs-templates/webpack

Relative static assets in CSS folder

Open

#932 ouverte le 20 sept. 2017

Voir sur GitHub
 (8 commentaires) (10 réactions) (0 assignés)JavaScript (4 466 forks)batch import
help wantedneed repro

Métriques du dépôt

Stars
 (9 721 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Just opening a new issue confirming that bug #208 still exists and @githoniel's solution is still necessary today.

This has all to do with using relative paths in CSS files.

<style>
  .element {
    background-image: url('~./assets/img/bg.png');
    // works in dev
    // in production, browser will try to retrieve /static/css/assets/img/bg.png
  }
</style>

Guide contributeur