I have an image (toolbar-bg.svg) in my assets folder, and trying to set it as the background image for an element. If I apply background: url('assets/toolbar-bg.svg')
then it won't build because postcss can't resolve the file, but if I apply background: url('../assets/toolbar-bg.svg')
it builds but then the path is wrong client side and it can't load the image. How do I get this to work properly?
Try These pathes
If none of them worked then you better try physical adresses
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.