vuejs-templates/webpack

Relative static assets in CSS folder

Open

#932 aperta il 20 set 2017

Vedi su GitHub
 (8 commenti) (10 reazioni) (0 assegnatari)JavaScript (4466 fork)batch import
help wantedneed repro

Metriche repository

Star
 (9721 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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>

Guida contributor