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

313 Views Asked by At

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.

0

There are 0 best solutions below