vuejs-templates/webpack

Relative static assets in CSS folder

Open

#932 opened on 2017年9月20日

GitHub で見る
 (8 comments) (10 reactions) (0 assignees)JavaScript (4,466 forks)batch import
help wantedneed repro

Repository metrics

Stars
 (9,721 stars)
PR merge metrics
 (30d に merged PR はありません)

説明

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>

コントリビューターガイド