Stenciljs - Background image css path


Im trying to add a background image on my scss file but I could not make it work.

This is the code on my scss file:

      background-image: url('./assets/images/Square.svg');

And when I use my component on my other app this is the path I get:


which is not my component path.

I tried to add ‘/dist/collection/assets/images’ but it did not worked

I found this bug report but it is closed and it seems that was not fixed.

Thanks in advance for your help

1 Like


I have the same issue !
When I use my component in my ionic app it cannont find the image !
Did you found a way to load backgroung image ?

Thank you