postcss-each icon indicating copy to clipboard operation
postcss-each copied to clipboard

with vite can't generate right asset path

Open nyrf opened this issue 4 years ago • 0 comments

I use it with vite, eg:

@each $val, $i in 1, 2 {
  .icon-$(val) {
    background: url('./images/$(val).png');
  }
}

.icon {
  background: url(./images/1.png);
}

after build

.icon-1 {
  background: url(./images/1.png);
}
.icon-2 {
  background: url(./images/2.png);
}
.icon {
  background: url(/assets/1.3f4b7f6e.png);
}

the icon-1 and icon-1 seems wrong codes, it should like background: url(/assets/1.3f4b7f6e.png);

nyrf avatar Sep 19 '21 03:09 nyrf