Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

with vite can't generate right asset path #40

Open
nyrf opened this issue Sep 19, 2021 · 0 comments
Open

with vite can't generate right asset path #40

nyrf opened this issue Sep 19, 2021 · 0 comments

Comments

@nyrf
Copy link

nyrf commented Sep 19, 2021

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);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant