NuxtN
Nuxt2y ago
2 replies
Anto'

Nuxt build faileld using image in css sheet

Hello guys ! I have this error when i try to build my app :

12.26 [error] Nuxt Build Error: [vite:css] [postcss] ENOENT: no such file or directory, open '/app/images/home/profit_gem.svg'

I used style like this on a .vue components :

span.wins:before {
  background-image: url("@/images/home/profit_gem.svg");
  background-size: 16px 16px;
  background-repeat: no-repeat;
  content: "";
  display: inline-block;
  vertical-align: middle;
  position: relative;
  width: 16px;
  height: 16px;
  margin-right: 4px;
}


on local it work. Maybe @ is not the correct way to do that.

Thanks in advance to everyone for your potentiel answer
Was this page helpful?