vuejs-templates/webpack

Relative static assets in CSS folder

Open

#932 aberto em 20 de set. de 2017

Ver no GitHub
 (8 comments) (10 reactions) (0 assignees)JavaScript (4.466 forks)batch import
help wantedneed repro

Métricas do repositório

Stars
 (9.721 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

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>

Guia do colaborador