vuejs: vue-cli 5 webpack cannot resolve url() in css
Asked Answered
G

0

6

I put the images in public directory(which contains index.html) and I use url() to make a background just like:

.login-container {
  background-image: url('/static/image1.png'),url('/static/image2.png');
}

but the vue-cli5 say that Can't resolve '/static/images/login_bg.jpg' in '...\views\login'

How could I solve this problem? when I use vue-cli 4 it works.

Gwenni answered 23/2, 2022 at 1:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.